Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

nblast fails to find smat.fcwb if nblast package is not attached. #31

Open
jefferis opened this issue Apr 4, 2016 · 4 comments
Open
Assignees
Labels

Comments

@jefferis
Copy link
Contributor

jefferis commented Apr 4, 2016

If using nblast inside another function when importing but not attaching nat.nblast

from elmr package.

 get(smat) 
2 nat.nblast::nblast(xdp, db, normalised = normalised, .parallel = .parallel, 
    ...) at nblast_fafb.R#64
1 nblast_fafb(27884, mirror = FALSE) 

workaround is to attach. Fix will involve something to do with scope of get statement (being pointed to objects in package)

@jefferis
Copy link
Contributor Author

@ajdm ping (but not actually required for the revision per se)

@jdmanton
Copy link
Collaborator

I had a look yesterday but failed, but will try and get it done this weekend.

@jdmanton
Copy link
Collaborator

So far I've tried @importFrom tags in nblast, etc., using get("smat.fcwb", envir=as.environment("package:nat.nblast")) and get("smat.fcwb", envir=asNamespace("nat.nblast")), and none of these work. It seems you can see functions that aren't exported, but not data. Adding an @export tag to the data objects doesn't work either. Any ideas?

@jefferis
Copy link
Contributor Author

Hmm. There are some ideas here: http://stackoverflow.com/questions/24354850/load-data-object-when-package-is-loaded

Sent from my iPhone

On 15 May 2016, at 17:10, James Manton notifications@github.com wrote:

So far I've tried @importFrom tags in nblast, etc., using get("smat.fcwb", envir=as.environment("package:nat.nblast")) and get("smat.fcwb", envir=asNamespace("nat.nblast")), and none of these work. It seems you can see functions that aren't exported, but not data. Adding an @export tag to the data objects doesn't work either. Any ideas?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants