R phangorn Rscript R CMD BATCH different results

前端 未结 1 946
臣服心动
臣服心动 2021-01-23 12:24

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<

相关标签:
1条回答
  • 2021-01-23 13:00

    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.

    0 讨论(0)
提交回复
热议问题