Juliet Hannah juliet.hannah at gmail.com
Sat Mar 6 21:07:09 CET 2010

```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)

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

> 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 <sahiilseth at gmail.com> wrote:
> Hello R experts,
> I am trying to analyze this dataset and am stuck on this problem for quite
> some time now.
> 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 at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help