Error in as.environment(pos) no item called "package:<package>" on the search list

Hi,

I got this error when testing a package I am writing. Within my package I am using a package called [facets](https://github.com/mskcc/facets) which has a dependency called pctGCdata.

The issue is my package does not directly call functions in pctGCdata, this is done by facets functions. But in facets functions, pctGCdata functions are not correctly namespaced, and no roxygen tags are used. My package therefore needs to attach pctGCdata I think(?)

How can I do this? I have #' @import pctGCdata in the relevant function in my package and run roxygen2::roxygenise(). I think I need to attach pctGCdata so it appears in search() as per Hadleys documentation. I have tried also to add to Depends in DESCRIPTION and using requireNamespace("pctGCdata") in the function in question but I am still getting this error.

NB I really need a solution that isn't "tell the facets package people to clean up their scripts"!

Thanks in advance,

Bruce

Should have been attachNamespace("pctGCdata") which works, durrr=D

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.