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? Best Vincent ################################################################ My session info for the interactive R ################################################################ > sessionInfo() R version 2.13.0 (2011-04-13) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=fr_FR.utf8 LC_NUMERIC=C [3] LC_TIME=fr_FR.utf8 LC_COLLATE=fr_FR.utf8 [5] LC_MONETARY=C LC_MESSAGES=fr_FR.utf8 [7] LC_PAPER=fr_FR.utf8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=fr_FR.utf8 LC_IDENTIFICATION=C attached base packages: [1] grid stats graphics grDevices utils datasets methods [8] base other attached packages: [1] metafor_1.6-0 Formula_1.0-0 nlme_3.1-101 gwa_0.0-1 [5] genetics_1.3.6 mvtnorm_0.9-9991 MASS_7.3-13 gtools_2.6.2 [9] gdata_2.8.2 combinat_0.0-8 rmeta_2.16 loaded via a namespace (and not attached): [1] lattice_0.19-26 tools_2.13.0 ############################################################# the same from Rscript ############################################################# R version 2.13.0 (2011-04-13) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=fr_FR.utf8 LC_NUMERIC=C [3] LC_TIME=fr_FR.utf8 LC_COLLATE=fr_FR.utf8 [5] LC_MONETARY=C LC_MESSAGES=fr_FR.utf8 [7] LC_PAPER=fr_FR.utf8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=fr_FR.utf8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets base other attached packages: [1] metafor_1.6-0 Formula_1.0-0 nlme_3.1-101 loaded via a namespace (and not attached): [1] grid_2.13.0 lattice_0.19-26 ________________________________ Dr Vincent Chouraki Assistant hospitalier universitaire Service d'épidémiologie régional CHRU de Lille, France [[alternative HTML version deleted]]
______________________________________________ R-help@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.