[Bioc-devel] Changes to pData <-

Richard Pearson richard.pearson at postgrad.manchester.ac.uk
Mon Oct 15 18:10:21 CEST 2007


Hi

I've noticed a change in pData <- since sometime recently before the 
upgrade to R2.6.0. It seems like its no longer possible to change the 
pData of an Affybatch or ExpressionSet object without first modifying 
the varLabels. The following example:

library(affy)
data(affybatch.example)
pData(affybatch.example) <- data.frame("AorB" = c("A", "B", "A"))

gives this error:

Error in `row.names<-.data.frame`(`*tmp*`, value = "AorB") : invalid 
'row.names' length

The modified code works fine:

library(affy)
data(affybatch.example)
varLabels(affybatch.example) <- "AorB"
pData(affybatch.example) <- data.frame("AorB" = c("A", "B", "A"))

It seems a bit unnecessary to have to do both the varLabels and pData 
steps, was this behaviour intended?

Many thanks

Richard


Richard Pearson
School of Computer Science
University of Manchester



More information about the Bioc-devel mailing list