I have two dataframes and I would like to do independent 2-group t-tests on the rows (i.e. t.test(y1, y2)
where y1
is a row in dataframe1 and y2
is matching row in dataframe2)
whats best way of accomplishing this?
EDIT: I just found the format: dataframe1[i,] dataframe2[i,]. This will work in a loop. Is that the best solution?