[R] Not finding superclass in library

Ramiro Barrantes ramiro at precisionbioassay.com
Mon Feb 23 21:35:25 CET 2015


Hello,

I have a library that I created that defines a parent class, assayObject.

I created other classes that inherit from it, say assayObjectDemo.  Each one of those classes I wanted to make in its own directory separate from where the assayObject is defined (there are reasons for that).

But now if I do:

library(assayObject)  #<--- where parent object is defined
source("assayObjectDemo.R")

where assayObjectDemo.R is just:

setClass("assayObjectDemo",contains="assayObject")
createDemoAssayObject <- function() {
  df <- data.frame()
  assay<-new(Class="assayObjectDemo")
  assay
}

I get:

Error in reconcilePropertiesAndPrototype(name, slots, prototype, superClasses,  :
  no definition was found for superclass “assayObject” in the specification of class “assayObjectDemo”

What can I do?  There are several reasons why I DO NOT want to define assayObjectDemo in the same library as assayObject, but I am not sure what the issue is here.  If I step through the code in an ESS R session it works fine.

Thanks in advance,

Ramiro

	[[alternative HTML version deleted]]



More information about the R-help mailing list