Page 1 of 1

Do we need library(xxxx)?

Posted: Sat Sep 23, 2017 9:40 am
by mcfanda@gmail.com
Hi
I understood that required packages are listed in DESCRIPTION file, under Imports. As far as understood, one does not need to call library() within the module. However, I'm working on a module and libraries are not loaded (not even jvmcore). If I call library(xxx) within the .run() or any other function .foo() within the R6::R6Class() module, it works fine. Is that correct?

Re: Do we need library(xxxx)?

Posted: Sat Sep 23, 2017 10:39 am
by jonathon
hi,

it's no different to an R package (because it is an R package). so you either need the full namespace:

packageName::functionName(),

or an import statement in your NAMESPACE file -- then you can just go:

functionName()

cheers

jonathon

Re: Do we need library(xxxx)?

Posted: Sat Sep 23, 2017 12:51 pm
by mcfanda@gmail.com
got it, thanks