Skip to content

[Bioc-devel] Changes to pData <-

2 messages · Richard Pearson, Martin Morgan

#
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
#
Thanks Richard, that should be fixed in the release branch as 1.16.1,
probably not appearing until Wednesday via biocLite. Available in
devel and release svn now.

Martin

Richard Pearson <richard.pearson at postgrad.manchester.ac.uk> writes: