I've some strange problems regarding R and Rscript. I'm using a bunch of scripts to read/write hdf files using the h5 package. In R Studio, everything works fine. As i want to execute my scripts automatically, I'm using the Windows Task Scheduler and rscript to execute the code, but this fails whenever i want to open a hdf file using
myfile <- h5file('somefilename', mode ='a')
The error reported is
Error in initialize(value, ...): cannot use object of class "character" in new(): class "H5File" does not extend that class
The h5 package is loaded and all the code works fine if i'm using RStudio. Any ideas?
many thanks & best regards Wolf
Update: I've edited the testfile to create some additional output:
ll=library(h5, verbose = TRUE)
fc <- file("c:/temp/rlog.txt")
writeLines(search(), fc)
close(fc)
myfile <- h5file('c:/temp/testfile.h5', mode ='a')
The error is the same, output from search() (in the rlog.txt file):
.GlobalEnv
package:h5
package:stats
package:graphics
package:grDevices
package:utils
package:datasets
Autoloads
package:base