[R] doubt about samr siggenes.table$genes.up

Peter Ehlers ehlers at ucalgary.ca
Tue May 25 22:41:36 CEST 2010


On 2010-05-25 10:54, Leonardo K wrote:
>
> Hi, here's my siggenes.table$genes.up snippet.
>
> Two class unpaired SAMR analysis.
>
> "Row" "Gene ID" "Gene Name" "Score(d)" "Numerator(r)" "Denominator(s+s0)"
> "Fold Change" "q-value(%)"
> "1" "25" "RPL15P22" "RPL15P22" "-1.44115338424578" "-18" "12.4899959967968"
> "1.27368448239355" "0"
> "2" "47" "CHAF1A" "CHAF1A" "-1.44115338424578" "-18" "12.4899959967968"
> "1.30356683838951" "0"
> "3" "48" "PARP2" "PARP2" "-1.44115338424578" "-18" "12.4899959967968"
> "1.09780831177589" "0"
> "4" "52" "HMGXB4" "HMGXB4" "-1.44115338424578" "-18" "12.4899959967968"
> "1.22596090318945" "0"
>
> Why do I get one column more in the data block (9) than the header (8)?
>
> Looks like the second column (25,47,48,etc) does not make sense.
>

Presumably you are getting this from an application of write.table?
If so, use the argument 'row.names = FALSE' to remove the *first*
column. See the first sentence in the 'CSV files' section of
?write.table.

Your second column is part of the data you're saving (probably
rownames from a larger dataframe or matrix).

  -Peter Ehlers



More information about the R-help mailing list