I have an R package, that depends on the base64enc
library. When I run the source file in the package with Rscript:
Rscript analyzer.R
it runs just fine.
The first line in analyzer.R is:
library(base64enc);
However, when I run a function from the package in the repl:
library(analyzer)
analyze()
It complains that base64enc is not installed.
Error in rawToChar(base64decode(mark[1])) :
could not find function "base64decode"
Calls: analyze ... collect.marks -> lapply -> FUN -> lapply -> FUN -> rawToChar
However, when in the REPL I manually include base64enc:
library(base64enc)
library(analyzer)
analyze()
It works fine. Is there anyway I can tell my analyzer package to use the base64enc library without having to include it in every script every time I use the library?