[Bioc-devel] read.AnnotatedDataFrame

Florian Hahne f.hahne at dkfz-heidelberg.de
Mon Jan 8 18:23:58 CET 2007

Hi Martin, all

I tried to adopt the read.AnnotatedDataFrame method on files that I was
able to import with read.phenoData before and got the following error

Error in data.frame(labelDescription = varLabels, row.names =
names(varLabels)) :
        row names supplied are of the wrong length

After taking a look at the code and changing the line
    varLabels <- as.list(rep("read from file", ncol(pData)))
    varLabels <- rep("read from file", ncol(pData))
the function created the AnnotatedDataFrame

Not sure if this is a bug or if my phenoData files should be formated in
another way, but I strongly doubt that the original version will work in
any case, since the implicit coercion in the following
varMetadata = data.frame(labelDescription = varLabels,
                row.names = names(varLabels))))
creates a data frame with 1 row and length(varLabels) columns, hence the
row.names=names(varLabels) argument will cause an error.

Am i wrong here?

R version 2.5.0 Under development (unstable) (2006-05-24 r38188)


attached base packages:
 [1] "splines"   "grid"      "tools"     "methods"   "stats"     "graphics"
 [7] "grDevices" "utils"     "datasets"  "base"

other attached packages:
  genefilter     survival    rnaiUtils      flomisc        RODBC       
    "1.13.5"       "2.29"        "1.0"      "1.0.2"      "1.1-7"    
RColorBrewer      Biobase
     "0.2-3"    "1.13.29"

Florian Hahne
Abt. Molekulare Genomanalyse (B050)
Deutsches Krebsforschungszentrum (DKFZ)
Im Neuenheimer Feld 580
D-69120 Heidelberg
phone: 0049 6221 424764
fax: 0049 6221 423454
web: www.dkfz.de/mga

More information about the Bioc-devel mailing list