I have a script which loads
library(XLConnect)
wb <- loadWorkbook("wbname")
the code works without errors when run from ESS which uses
R version 3.0.1 (2013-05-16) -- "Good Sport"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)
But fails when run from Rscript
which Rscript
C:\Program Files\R\R-3.0.1\bin\i386\Rscript.EXE
Rscript updatevols.R
Warning message:
package 'RODBC' was built under R version 3.0.2
XLConnect 0.2-7 by Mirai Solutions GmbH
http://www.mirai-solutions.com ,
http://miraisolutions.wordpress.com
Warning message:
package 'XLConnect' was built under R version 3.0.3
Error in .jfield(x, "Ljava/lang/Class;", "TYPE") :
could not find function "getClass"
Calls: loadWorkbook ... ._java_class_list -> lapply -> FUN -> .jfield
-> .Call
Execution halted
Warning message:
closing unused RODBC handle 1
Any clues?
Stephen B
[[alternative HTML version deleted]]
You seem to be using different versions of R for these two trials.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live
Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
On June 12, 2014 1:22:07 PM MDT, "Bond, Stephen" <Stephen.Bond at
cibc.com> wrote:>I have a script which loads
>
>library(XLConnect)
>wb <- loadWorkbook("wbname")
>
>the code works without errors when run from ESS which uses
>R version 3.0.1 (2013-05-16) -- "Good Sport"
>Copyright (C) 2013 The R Foundation for Statistical Computing
>Platform: i386-w64-mingw32/i386 (32-bit)
>
>But fails when run from Rscript
>which Rscript
>C:\Program Files\R\R-3.0.1\bin\i386\Rscript.EXE
>
>Rscript updatevols.R
>
>Warning message:
>package 'RODBC' was built under R version 3.0.2
>XLConnect 0.2-7 by Mirai Solutions GmbH
>http://www.mirai-solutions.com ,
>http://miraisolutions.wordpress.com
>Warning message:
>package 'XLConnect' was built under R version 3.0.3
>Error in .jfield(x, "Ljava/lang/Class;", "TYPE") :
> could not find function "getClass"
>Calls: loadWorkbook ... ._java_class_list -> lapply -> FUN ->
.jfield
>-> .Call
>Execution halted
>Warning message:
>closing unused RODBC handle 1
>
>Any clues?
>
>Stephen B
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.
Explicitly load the methods package: library(methods) Hadley On Thu, Jun 12, 2014 at 2:22 PM, Bond, Stephen <Stephen.Bond at cibc.com> wrote:> I have a script which loads > > library(XLConnect) > wb <- loadWorkbook("wbname") > > the code works without errors when run from ESS which uses > R version 3.0.1 (2013-05-16) -- "Good Sport" > Copyright (C) 2013 The R Foundation for Statistical Computing > Platform: i386-w64-mingw32/i386 (32-bit) > > But fails when run from Rscript > which Rscript > C:\Program Files\R\R-3.0.1\bin\i386\Rscript.EXE > > Rscript updatevols.R > > Warning message: > package 'RODBC' was built under R version 3.0.2 > XLConnect 0.2-7 by Mirai Solutions GmbH > http://www.mirai-solutions.com , > http://miraisolutions.wordpress.com > Warning message: > package 'XLConnect' was built under R version 3.0.3 > Error in .jfield(x, "Ljava/lang/Class;", "TYPE") : > could not find function "getClass" > Calls: loadWorkbook ... ._java_class_list -> lapply -> FUN -> .jfield -> .Call > Execution halted > Warning message: > closing unused RODBC handle 1 > > Any clues? > > Stephen B > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-- http://had.co.nz/