I'm having a problem getting littler to see an installed packaged. I've gotten it down to just trying to fun this one line saved in a file called min.R
require(jsonlite)
I can execute this line of code and load the package just fine running the R terminal, but if I try this from the command line I get an error that jsonlite
is not found:
root# r min.R
Loading required package: jsonlite
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘jsonlite’
Why is this happening and how can I fix it?
Additional details:
If I try require(zoo)
this works fine when run from littler. Here is some of the output of installed.packages()
in relevant part:
Enhances
jsonlite NA
...
zoo NA
License License_is_FOSS License_restricts_use
jsonlite "MIT + file LICENSE" NA NA
...
zoo "GPL-2 | GPL-3" NA NA
OS_type MD5sum NeedsCompilation Built
jsonlite NA NA "yes" "3.0.2"
...
zoo NA NA "yes" "3.0.2"
Sorry, I missed this when it was originally posted.
In the past littler read nothing. I then added /etc/littler.r
and ~/.littler.r
support. The next version will read /etc/R/Rprofile.site
and ~/.Rprofile
as well.
So for now just put some code into ~/.littler.r
. As for not finding things, check via
$ r -e 'print(.libPaths())'