Entering edit mode
Georg Otto
▴
510
@georg-otto-956
Last seen 10.3 years ago
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])
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