Some code to cut and paste would be helpful. The following may help out. library(multtest)
# create some p-values p <- runif(100) p <- sort(p) p_adj <- mt.rawp2adjp(p, proc="BH", alpha = 0.05) > str(p_adj) List of 4 $ adjp : num [1:100, 1:2] 0.0142 0.0174 0.0254 0.0258 0.0736 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:2] "rawp" "BH" $ index : int [1:100] 1 2 3 4 5 6 7 8 9 10 ... $ h0.ABH : NULL $ h0.TSBH: NULL > p_results <- p_adj$adjp > is.data.frame(p_results) [1] FALSE p_results <- as.data.frame(p_results) p_results[p_results$BH < 0.8,] p_subset <- subset(p_results,BH < 0.8) On Tue, Mar 2, 2010 at 11:04 PM, Sahil Seth <sahiils...@gmail.com> wrote: > Hello R experts, > I am trying to analyze this dataset and am stuck on this problem for quite > some time now. > I am using mt.rawp2adjp. > the output that came out was a matrix with two colums since I had asked it > to calculate the adjusted p values using one method. > so it has the two columns as: rawp BH > > I combined these using cbind with my actual dataframe. > checked using head all was fine. > > thereafter I am trying to extract the rows where the values in BH are below > a particular value(alpha say 0.05): > by the command: > partMult <- subset(multData,BH < 0.05) > this gives a error saying that > the operator < is not valid for factors. > Initally it seemed that the column BH is a factor, but typeof(BH) revealed > that it is a integer variable. > > I also tried converting it into doube, and it did convert but then the > values just changed: > 0.0008 became 34 > .0009 become say 28 and so on. > > It would be great to have your inputs on the issue. > > I am currently exploring the mt.reject function. > > thanks > Sahil > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.