Hello, I am trying to use the p.adjust function for multiple testing. here is what i have 9997 201674_s_at 0.327547396 9998 221013_s_at 0.834211067 9999 221685_s_at 0.185099475 I import them from excel have have the gene symbol as well as the pvalue here is the issue> pa<-p.adjust(pt,method="BH")Error in p[nna] : object is not subsettable In addition: Warning message: In is.na(p) : is.na() applied to non-(list or vector) of type 'closure'> adjust<-sum(pa<0.1)Is there anything i need to change? thanks, k -- View this message in context: http://www.nabble.com/p-adjust-using-Benjamn-and-Hochberg-tp15944523p15944523.html Sent from the R help mailing list archive at Nabble.com.
On Sun, 9 Mar 2008, Keizer_71 wrote:> > Hello, > > I am trying to use the p.adjust function for multiple testing. > > here is what i have > > 9997 201674_s_at 0.327547396 > 9998 221013_s_at 0.834211067 > 9999 221685_s_at 0.185099475 > > I import them from excel have have the gene symbol as well as the pvalue > > here is the issue > >> pa<-p.adjust(pt,method="BH") > Error in p[nna] : object is not subsettable > In addition: Warning message: > In is.na(p) : is.na() applied to non-(list or vector) of type 'closure' >> adjust<-sum(pa<0.1) > > Is there anything i need to change?Your understanding of what pt is, perhaps? Try str( pt ) to learn more. If it turns out that pt is not a vector of p-values (and the error message suggests that it might be stats:::pt), then you have to figure out how to obtain a vector of p-values "from excel". The 'R Data Import/Export' Manual and 'An Introduction to R' are your friends. HTH, Chuck> > thanks, > k > -- > View this message in context: http://www.nabble.com/p-adjust-using-Benjamn-and-Hochberg-tp15944523p15944523.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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. >Charles C. Berry (858) 534-2098 Dept of Family/Preventive Medicine E mailto:cberry at tajo.ucsd.edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901
Keizer_71 <christophe.lo at gmail.com> wrote in news:15944523.post at talk.nabble.com:> > Hello, > > I am trying to use the p.adjust function for multiple testing. > > here is what i have > > 9997 201674_s_at 0.327547396 > 9998 221013_s_at 0.834211067 > 9999 221685_s_at 0.185099475 > > I import them from excel have have the gene symbol as well as the > pvalue > > here is the issue > >> pa<-p.adjust(pt,method="BH") > Error in p[nna] : object is not subsettable > In addition: Warning message: > In is.na(p) : is.na() applied to non-(list or vector) of type > 'closure' >> adjust<-sum(pa<0.1) > > Is there anything i need to change?Two that I can think of: A) Change your posting style. Start including reproducible code. You are making the audience guess at what pt might be. At the very least you could have included the results of str(pt). B) Change the argument to p.adjust so that it is the vector of p-values rather than what is (probably) the entire dataframe. See: gt<-"9997 201674_s_at 0.327547396 9998 221013_s_at 0.834211067 9999 221685_s_at 0.185099475 " gene.p<-read.table(file=textConnection(gt),header=FALSE) pa<-p.adjust(gene.p$V3,method="BH")> pa[1] 0.4913211 0.8342111 0.4913211 -- David Winsemius
Maybe Matching Threads
- Games-Howell, Gabriel, Hochberg
- a question about sort and BH
- Box plot with 5th and 95th percentiles instead of 1.5 * IQR: problems implementing an existing solution...
- SGID bit not obeyed in 4.3.9?
- How to pass value to an argument in a function which is an argument to the main function