I would like to perform a two-sample t-test on my data within R. Given two high-dimensional data frames, I need to somehow loop through matching columns (String colnames() in header) over all rows and perform the test for each column pair - one from df1 and df2, respectively. The problem is that the columns from the data frames are not in right order, i.e. col1 form df1 doesn't match col1 from df2, and df2 has additional columns that don't exist in df1. I've never used R for such tasks and I wonder if there is a fast and handy solution to find matching column pairs in the data frames for the t-test.I would like to perform a two-sample t-test on