I\'m receiving strange error when trying to run an R
script using the phangorn
package. Whenever I run the script using:
Rscript mini_example.R<
This works with Rscript
if you import library(methods)
in addition to phangorn
. This changes the sessionInfo() for methods
from "loaded via a namespace (and not attached)" to "attached base packages", which was the only difference between your sessionInfo() for Rscript
vs R CMD BATCH
.
I don't know why the two would differ. However, this answer remarks that littler (an alternative to Rscript
) "load the methods package", which would suggest that the authors of littler
have experienced your issue too.