[R] Frame Column to List (conversion)

Rui Barradas ruipbarradas at sapo.pt
Sun Jul 22 09:26:25 CEST 2012


Hello,

Try using the vector geneLabel. You don't need to convert to list.

rownames(expValues) <- geneLabel # if this doesn't work
rownames(expValues) <- as.vector(geneLabel)

But I really don't see a problem with the first. Have you tried it?

Hope this helps,

Rui Barradas

Em 22-07-2012 03:04, biostat1 escreveu:
> Hi,
>
> Input Format: excel file (XLS)
> Column 1: Gene ID (alphanumeric)
> Column 2 - 10 : (numeric data).
>
> inData = read.xls ( <fileName>)
> geneLabel =  inData [  , 1]         - column 1 stored in geneLabel
> tempData = inData [ , 2: 10]
> expValues = data.matrix (tempData)   - convert frame into Matrix format
>
> expValues has the matrix format needed for analysis.
>
> I need to bind gene labels as .
>   I have this data in geneLablel  (extracted from data.frame)
> How do I convert this to a list so i can use
> rownames(expValues)  <-  ???????
>
> thanks
>
>
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Frame-Column-to-List-conversion-tp4637341.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.



More information about the R-help mailing list