1

I am working with a data matrix that has 86 rows(that are 86 leaves of plants) and 10 columns (that are secondary metabolites measured on 3 different points of the given leaf : proximal, middle, distal part, + the leaf column).

I have to do a t.test on every single leaf compared to every single other leaf. The tricky part is that I have to do a t.test comparing the proximal data with the other proximal measurement data as well. So: first leaf proximal value - second leaf proximal value and this goes on for every middle and distal part as well. I cannot wrap around my head as to how I should write a loop for it that does this function.

wide <- readxl::read_xlsx("dualbeat.xlsx")
head(wide)

tmp <-as.data.frame(wide)

ttt<- tmp$aluchl[1]
tt2<- tmp$aluchl[2]

t.test(ttt,tt2, mu = 0, alt= "two.sided", conf = 0.90, var.equal = FALSE, paired = F)
help(t.test)

I wish to have all the measurements t.tested and the the t.test command gives the return "not enough x observations"

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.