Dear all,

Kasper gave this recent advice not to call new() in the prototype (or at
least that was how it was interpreted) 

  You (and everyone else) should not construct new instances by using
  new() together with prototype.

This could be handled by setting the version in the initialize method,
which seems to address some of the random errors we see.

But, this apparently leads to calling classVersion("nameOfClass") (not
classVersion(instanceOfClass)) to miss the version completely:

> tmp <- (new("Spectrum2"))
> classVersion(tmp)
 Spectrum Spectrum2 
  "0.4.0"   "0.3.0" 
> classVersion("Spectrum2")
[1] "Versioned; no version string"

as opposed to

> tmp <- new("ExpressionSet")
> classVersion(tmp)
            R       Biobase          eSet ExpressionSet 
      "3.3.1"      "2.33.4"       "1.3.0"       "1.0.0" 
> classVersion("ExpressionSet")
            R       Biobase          eSet ExpressionSet 
      "3.3.1"      "2.33.4"       "1.3.0"       "1.0.0" 

which in turn breaks updateObject

> updateObject(new("Spectrum2"))
updateObject(object = 'Spectrum')
Error: invalid version specification ‘Versioned; no version string’
> updateObject(new("ExpressionSet"))
ExpressionSet (storageMode: lockedEnvironment)
assayData: 0 features, 0 samples 
  element names: exprs 
protocolData: none
phenoData: none
featureData: none
experimentData: use 'experimentData(object)'

Any advice or suggestion?


_______________________________________________ mailing list

Reply via email to