[Rd] Rscript fails with some packages (for example, h5)

Dirk Eddelbuettel edd at debian.org
Tue Dec 26 15:40:46 CET 2017


On 26 December 2017 at 22:14, Sun Yijiang wrote:
| Thanks for the solution.  Now I know the work-arounds, but still don't
| quite get it. Why does R_DEFAULT_PACKAGES has anything to do with
| library(methods)?

Because it governs which packages are loaded by default.  And while R also
loads 'methods', Rscript does not. Source of endless confusion.

| If library(h5) works, it should just work, not depend on an environment variable.

Every package using S4 will fail under Rscript unless 'methods' explicitly.

| Rscript is not consistent with R, that's my confusion.

Indeed. And you are not the first person confused by it.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



More information about the R-devel mailing list