Hi, I installed R on USB-drive, but when I run Rgui.exe from bin folder, I get this error: ----------------------- R version 2.10.1 (2009-12-14) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. Error in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : 'stats' is not a valid installed package> var(1:10)Error: could not find function "var" ---------------------------- So it seems that stats package is not loaded. How can I fix this? Thanks, Lauri> sessionInfo()R version 2.10.1 (2009-12-14) i386-pc-mingw32 locale: [1] LC_COLLATE=Finnish_Finland.1252 LC_CTYPE=Finnish_Finland.1252 [3] LC_MONETARY=Finnish_Finland.1252 LC_NUMERIC=C [5] LC_TIME=Finnish_Finland.1252 attached base packages: [1] graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tools_2.10.1>[[alternative HTML version deleted]]
Lauri Nikkinen wrote:> Hi, > > I installed R on USB-drive, but when I run Rgui.exe from bin folder, I get > this error: > > ----------------------- > R version 2.10.1 (2009-12-14) > Copyright (C) 2009 The R Foundation for Statistical Computing > ISBN 3-900051-07-0 > > R is free software and comes with ABSOLUTELY NO WARRANTY. > You are welcome to redistribute it under certain conditions. > Type 'license()' or 'licence()' for distribution details. > > R is a collaborative project with many contributors. > Type 'contributors()' for more information and > 'citation()' on how to cite R or R packages in publications. > > Type 'demo()' for some demos, 'help()' for on-line help, or > 'help.start()' for an HTML browser interface to help. > Type 'q()' to quit R. > > Error in library(package, lib.loc = lib.loc, character.only = TRUE, > logical.return = TRUE, : > 'stats' is not a valid installed package >Looks like something went wrong when you installed there. Did you try re-installing? Duncan Murdoch> >> var(1:10) >> > Error: could not find function "var" > ---------------------------- > > So it seems that stats package is not loaded. How can I fix this? > > Thanks, > Lauri > > >> sessionInfo() >> > R version 2.10.1 (2009-12-14) > i386-pc-mingw32 > > locale: > [1] LC_COLLATE=Finnish_Finland.1252 LC_CTYPE=Finnish_Finland.1252 > [3] LC_MONETARY=Finnish_Finland.1252 LC_NUMERIC=C > [5] LC_TIME=Finnish_Finland.1252 > > attached base packages: > [1] graphics grDevices utils datasets methods base > > loaded via a namespace (and not attached): > [1] tools_2.10.1 > > > [[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. >
I run R off a flash drive. I just copy the directory that it was installed on my hard drive to the flash drive and things work fine. On Mon, Feb 8, 2010 at 2:28 PM, Lauri Nikkinen <lauri.nikkinen at iki.fi> wrote:> Hi, > > I installed R on USB-drive, but when I run Rgui.exe from bin folder, I get > this error: > > ----------------------- > R version 2.10.1 (2009-12-14) > Copyright (C) 2009 The R Foundation for Statistical Computing > ISBN 3-900051-07-0 > > R is free software and comes with ABSOLUTELY NO WARRANTY. > You are welcome to redistribute it under certain conditions. > Type 'license()' or 'licence()' for distribution details. > > R is a collaborative project with many contributors. > Type 'contributors()' for more information and > 'citation()' on how to cite R or R packages in publications. > > Type 'demo()' for some demos, 'help()' for on-line help, or > 'help.start()' for an HTML browser interface to help. > Type 'q()' to quit R. > > Error in library(package, lib.loc = lib.loc, character.only = TRUE, > logical.return = TRUE, ?: > ?'stats' is not a valid installed package > >> var(1:10) > Error: could not find function "var" > ---------------------------- > > So it seems that stats package is not loaded. How can I fix this? > > Thanks, > Lauri > >> sessionInfo() > R version 2.10.1 (2009-12-14) > i386-pc-mingw32 > > locale: > [1] LC_COLLATE=Finnish_Finland.1252 ?LC_CTYPE=Finnish_Finland.1252 > [3] LC_MONETARY=Finnish_Finland.1252 LC_NUMERIC=C > [5] LC_TIME=Finnish_Finland.1252 > > attached base packages: > [1] graphics ?grDevices utils ? ? datasets ?methods ? base > > loaded via a namespace (and not attached): > [1] tools_2.10.1 >> > > ? ? ? ?[[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. >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve?
Lauri Nikkinen wrote:> Hi, > > I installed R on USB-drive, but when I run Rgui.exe from bin folder, I get > this error:...> > Error in library(package, lib.loc = lib.loc, character.only = TRUE, > logical.return = TRUE, : > 'stats' is not a valid installed package > >> var(1:10) > Error: could not find function "var" > ---------------------------- > > So it seems that stats package is not loaded. How can I fix this?Does R know where to find its packages? Can you say .libPaths() and tell us what the output is? And where is the actual install of ...\library\stats? -- O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
The answer is:> .libPaths()[1] "E:/R/R-2.10.1/library" stats package is found under .../library/ I tried Jim's suggestion and copied R-2.10.1 directory from C:\Program Files\R\ into USB-disk, and everything seems to work fine. Re-istallation did not help. Thanks, -Lauri 2010/2/9, Prof Brian Ripley <ripley@stats.ox.ac.uk>:> > On Tue, 9 Feb 2010, Peter Dalgaard wrote: > > Lauri Nikkinen wrote: >> >>> Hi, >>> >>> I installed R on USB-drive, but when I run Rgui.exe from bin folder, I >>> get >>> this error: >>> >> >> ... >> >>> >>> Error in library(package, lib.loc = lib.loc, character.only = TRUE, >>> logical.return = TRUE, : >>> 'stats' is not a valid installed package >>> >>> var(1:10) >>>> >>> Error: could not find function "var" >>> ---------------------------- >>> >>> So it seems that stats package is not loaded. How can I fix this? >>> >> >> Does R know where to find its packages? Can you say >> >> .libPaths() >> >> and tell us what the output is? And where is the actual install of >> ...\library\stats? >> > > It would not have got that far if it could not find 'base'. > I think Duncan Murdoch is likely to be correct: this looks like a corrupt > install. > > >> -- >> O__ ---- Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B >> c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K >> (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 >> ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 >> >> ______________________________________________ >> 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<http://www.r-project.org/posting-guide.html> >> and provide commented, minimal, self-contained, reproducible code. >> >> > -- > Brian D. Ripley, ripley@stats.ox.ac.uk > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595[[alternative HTML version deleted]]