Re: [R] p-adjust using Benjamn and Hochberg

From: Christophe Lo <christophe.lo_at_gmail.com>
Date: Sun, 09 Mar 2008 22:43:29 +0000

Hi David,

thank you. Sorry, I will make sure it is clear next time.

Chris

On 3/9/08, David Winsemius <dwinsemius_at_comcast.net> wrote:
>
> Keizer_71 <christophe.lo@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
>
> ______________________________________________
> 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.
>

-- 
Christophe Lo
(078) 8275 7029
Christophe.Lo_at_gmail.com

	[[alternative HTML version deleted]]

______________________________________________
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.
Received on Sun 09 Mar 2008 - 22:45:39 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 09 Mar 2008 - 23:30:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive