[R] package loadable in R 3.1.1 Rterm but not in emacs/ESS

Christopher W Ryan cryan at binghamton.edu
Fri Sep 26 16:38:42 CEST 2014


I'm running R on Windows 7. Clean install on a brand new computer
yesterday.  I installed Protext then R then Vincent Goulet's emacs
with ESS, in that order.

I then installed some R packages, in the R terminal window.  Among them was car

Today I opened emacs, hit M-x R to start an R session, and tried to
load the car library. Results looked like the following:


R version 3.1.1 (2014-07-10) -- "Sock it to Me"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)

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.

> > options(chmhelp=FALSE, help_type="text")
> options(STERM='iESS', str.dendrogram.last="'", editor='emacsclient.exe', show.error.locations=TRUE)
>
> library(car)
Error in library(car) : there is no package called 'car'
>



However, in an R terminal (that is, outside of emacs) the car package
loads fine:

R version 3.1.1 (2014-07-10) -- "Sock it to Me"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)

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.

> library(car)
>

I have not encountered this before and am confused. Why would R 3.1.1
in its terminal "see" a library, whereas it would not in emacs?  (car
is just an example; the same thing happens with zoo, stringr, Hmisc,
and others.)

Thanks.

--Chris Ryan



More information about the R-help mailing list