Closed dkropp2 closed 3 years ago
Hello Dr. Gloor I've come as a desperate graduate student with very little coding experience to try and work out this issue. I am trying to run the code as shown below:
count <- 3 aldex.controls <- data.frame(Controls[which(apply(Controls, 1, function(x){sum(x)}) > count),], check.names=F) strain <- c("S","Ctl")
x.controls <- aldex.clr(aldex.controls, strain, mc.samples=2, denom="zero", verbose=TRUE) x.controls.tt <- aldex.ttest(x.controls, conds, paired.test=FALSE)
x.controls.effect <- aldex.effect(x.controls, conds, include.sample.summary=FALSE, verbose=TRUE) x.controls.all <- data.frame(x.controls.tt, x.controls.effect, stringsAsFactors=FALSE)
When I do I get the following error when I get the the aldex.ttest function: Error in apply(data[, grp1], 1, sd) : dim(X) must have a positive length
I know this has something to do with the formatting of clr but I'm really lost as to how to fix it. Any and all help is appreciated!
Hello Dr. Gloor I've come as a desperate graduate student with very little coding experience to try and work out this issue. I am trying to run the code as shown below:
count <- 3 aldex.controls <- data.frame(Controls[which(apply(Controls, 1, function(x){sum(x)}) > count),], check.names=F) strain <- c("S","Ctl")
x.controls <- aldex.clr(aldex.controls, strain, mc.samples=2, denom="zero", verbose=TRUE) x.controls.tt <- aldex.ttest(x.controls, conds, paired.test=FALSE)
x.controls.effect <- aldex.effect(x.controls, conds, include.sample.summary=FALSE, verbose=TRUE) x.controls.all <- data.frame(x.controls.tt, x.controls.effect, stringsAsFactors=FALSE)
When I do I get the following error when I get the the aldex.ttest function: Error in apply(data[, grp1], 1, sd) : dim(X) must have a positive length
I know this has something to do with the formatting of clr but I'm really lost as to how to fix it. Any and all help is appreciated!