I am new to R so be easy! I have two datasets in which two different samples (men and women) are asked the same questions (column names are identical). I want to run a t-test comparing the means of any two columns in each dataset but I can't figure out how to merge them into one dataset in a useful way. I have tried a few things like merge and rbind but they are not doing what I would like.
Here is a column in dataset 1. I would like to compare it with...
structure(list(UVRATE1 = c(6, 6, 3, 7, 7, 7, 4, 6, 6, 6, 6, 4,
7, 4, 1, 5, 6)), class = "data.frame", row.names = c(NA, -17L
))
... this column in dataset 2 (as you can see, same column names.
structure(list(UVRATE2 = c(4, 1, 3, 5, 6, 7, 7, 4, 7, 4, 7, 7,
4, 4, 5, 1, 4)), class = "data.frame", row.names = c(NA, -17L
))