Hi all and thanks in advance for your help,
I have a data.frame in which I have multiple columns that I want to run a t.test over I'm trying to use the following code to run this
Cardenas1000.Rarefied.Sig<-lapply(Cardenas1000.Rarefied.Sig[,c(2:74)], function(x) t.test(x ~ Cardenas1000.Rarefied.Sig$Dis_Diag))
Unfortunately some of these columns are not appropriate for a t.test as they are more or less constant across the variable of interest, when R gets to these columns it simply stops the code running altogether Is there a way to either for the code to pass these columns, or to identify them so they can be removed prior to running the code?
Thanks again in advance!