Hi all,
I am trying to apply the LPE approach on a gene expression set that I have but I have stacked in the calculation of the baseline distribution (I am following the steps that I found on the Bioconductor for the LPEadj package) . I am trying to run the following command:
var.1 <- baseOlig.error(G13[,2:12],q=0.01)
And I am receiving the following error:
Error in if (sum(A == min(A)) > (q * length(A))) { :
missing value where TRUE/FALSE needed
I realize that the error occurs due to some missing values in my data. So, is there any way to make the function to ignore these missing values? I tried to ignore the lines that include at least one "NA", but each line represents a unique gene and I am losing it.
Thank you very much in advance, Vasilis.
Thank you very much, Kevin. I can see your point. I will generate each of these functions with the '''na.rm''' option enabled, but what do you mean with the '''stats=function(x)'''? Which will be the '''function(x)'''?
The NAs <- 0 is much easier but I believe that I'm missing information with this approach. I have tried to replace the NAs with the mean value of the row (gene in different samples) but again I am not so sure for this.
I tried it myself (editing the code) and ended up getting new errors, but I believe it is possible to do.
Regarding the function command, I should actually have written (now edited, above):
This is the same as just doing things like this:
Now add
na.rm=TRUE
: