On 27/12/2017 9:11 AM, Sun Yijiang wrote:
Thanks for the details. I’m new to R, and I’m not blaming anything here,
just that I’m still not clear what good it makes to keep this inconsistency
between R and Rscript. To me (and probably to many others from Perl/Python
etc.), this is shockingly weird
Thanks for the details. I’m new to R, and I’m not blaming anything here,
just that I’m still not clear what good it makes to keep this inconsistency
between R and Rscript. To me (and probably to many others from Perl/Python
etc.), this is shockingly weird. I can live with that, and I also want to
k
Duncan,
Very nice tutorial. However it does NOT take away from the fact that _very_
simple_ scripts (like the one posted by Sun at the beginning of this thread)
simply _fail_ in error under Rscript.
Whereas they don't under R or r.
The R environment ships an interpreter meant for command-line a
On 26/12/2017 9:40 AM, Dirk Eddelbuettel wrote:
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
Hi Dirk,
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)? If library(h5) works, it should just work, not depend on
an environment variable. Rscript is not consistent with R, that's my
confus
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 'metho
On 26 December 2017 at 15:24, Sun Yijiang wrote:
| After looking into C source code, I found that Rscript by default fills
| environment variable R_DEFAULT_PACKAGES with
| "datasets,utils,grDevices,graphics,stats", and it somehow fails some
| package like h5.
|
| The problem here is, not setting
Consider this script (with h5 installed):
$ cat test.R
library(h5)
name <- tempfile()
f <- h5file(name)
file.remove(name)
$ Rscript test.R
Error in initialize(value, ...) :
cannot use object of class "character" in new(): class "H5File" does not
extend that class
Calls: h5file -> new -> initia