[BioC] coerce matrix to aafTable

James W. MacDonald jmacdon at med.umich.edu
Thu Nov 29 15:01:04 CET 2007

Hi Georg,

Georg Otto wrote:
> Hi,
> I have an R/bioconductor problem, that seemed to be quite simple to me
> at the first glance, but turned out to be tricky, either because I do
> not have reached the necessary level of R-savvyness yet, or because I
> miss something obvious.
> Here is the problem: I want to transform a matrix of expression
> values (where rows are genes and columns are hybridizations) into an
> aafTable (from package annaffy). The probe IDs should be taken from
> the row names of the matrix and the column names should be taken from
> the column names of the matrix.  No problem to do this by hand:
> table<-aafTable(probeids=rownames(matrix),
>     "colname1"=matrix[,1],
>     "colname2"=matrix[,2],
>     "colname3"=matrix[,3],
>     "colname4"=matrix[,4])

table <- aafTable(items = as.data.frame(matrix))

This can be rather computationally expensive if the matrices are large, 
but it is probably the simplest solution.



> I would like to do that programatically for many different matrices
> which differ both in the number of columns and in the column names,
> maybe by using a small function. However I was not successful to
> contrive such a thing. Maybe somebody out there could give me a hint?
> Best,
> Georg
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

James W. MacDonald, M.S.
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109

More information about the Bioconductor mailing list