Closed epipping closed 7 years ago
As much as the error is cryptic and not helpful... I've now figured out that one needs to load methods
here, e.g. by adding library(methods)
to the start of the script or invoking Rscript
via
Rscript --vanilla --default-packages=methods foo.R
I was trying to run
Rscript
on a script that usesh5
. Here's the minimal sample code (which I'll place in the filefoo.R
):Running this through
R CMD BATCH
works just fine:Loading it from within
R
works, too:Yet
Rscript
fails spectacularly: