[R] methods package not loaded by default when using Rscript in R2.13

peter dalgaard pdalgd at gmail.com
Fri Jul 1 13:41:52 CEST 2011


On Jul 1, 2011, at 12:52 , vincent chouraki wrote:

> Dear all,
> 
> As the object of this mail suggests, the methods package is not loaded by 
> default in R2.13 when using Rscript whereas it is loaded when using an 
> interactive session.
> 
> An example with the metafor package :
> 
> library(metafor)
> example(addpoly.rma)
> 
> this works in an interaction R shell, but put it in a .R file and use it with 
> Rscript, it won't work until you added
> 
> library(methods)
> 
> One of my colleague had the same issue with other custom R functions (work in 
> 2.12, not anymore in 2.13 because of the same behavior)
> 
> Is this something that was planned or a bug?

It's intentional. See help(Rscript) for the reason and the remedies.

-pd

-- 
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list