Dear Michael,

Many thanks for writing.

> Do any of the suggestions in section 1.5.3 of Writing R Extensions "Load 
> hooks" work?

I thought I had tried all the various permutations in .onLoad but at your 
prompting I tried some more and this seems to work:

.onLoad <- function (libname, pkgname) {
  # set up default landmarks object
  assign('landmarks',
         envir = parent.env(environment()),
         testdataalias::landmarks.2017)

}

It doesn't seem to tickle R CMD check, but I'm not yet convinced that it is 
100% safe. Any comments either way are welcome!

Best wishes,

Greg.

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to