HenrikBengtsson / R.oo

R package: R.oo - R Object-Oriented Programming with or without References
https://cran.r-project.org/package=R.oo
20 stars 1 forks source link

getStaticInstance() for Object requires R (>= 2.14.0) for rather old Objects saved to file #13

Closed HenrikBengtsson closed 8 years ago

HenrikBengtsson commented 8 years ago

getStaticInstance() for Object requires R (>= 2.14.0) for Object:s saved to file using R.oo (< 1.14.0), which was released 2013-08-20. This is because it then calls requireNamespace(), which was introduced first in R 2.14.0:

    if (requireNamespace(package, quietly=TRUE)) {
      ns <- getNamespace(package);
      clazz <- .getClassByName(className, where="ns", envir=ns, mustExist=FALSE);
      if (!is.null(clazz)) {
        static <- getStaticInstance(clazz);
        return(static);
      }
    }
HenrikBengtsson commented 8 years ago

BTW, R.methodsS3 requires R (>= 2.13.0), so effectively R.oo also requires R (>= 2.13.0).