I have a large table of data which i can read in using read.table. 
I then want to conduct various tests on the data.

Is there a simple way to conduct these tests by specifying the column headers which relate to different conditions of the experiment?

e.g. data1 <- read.table("test.table", header=TRUE)
t.test(test~control, data = data1)

Which doesn't work and results in the error
"Error in t.test.formula(test ~ control, data = data1) : 
  grouping factor must have exactly 2 levels"


Many Thanks

Richard
	[[alternative HTML version deleted]]

