[R] Problem installing packages

Vincent Goulet vincent.goulet at act.ulaval.ca
Fri Apr 20 05:16:54 CEST 2007


Le 07-04-19 à 19:02, Peter Dalgaard a écrit :

> Dirk Eddelbuettel wrote:
>> On Thu, Apr 19, 2007 at 10:51:58PM +0200, Peter Dalgaard wrote:
>>
>>> Deepankar Basu wrote:
>>>
>>>> I tried to install the package "tseries" but could not do so. Any
>>>> suggestions are welcome. I am using Ubuntu Linux and here is  
>>>> what I did:
>>>>
>>>> $ sudo R
>>>>
>>>> Then once in R, I did
>>>>
>>>>
>>>>
>>>>> install.packages("tseries", dep=TRUE)
>>>>>
>>>>>
>>>> which gave a long list of errors. Going through them, I saw that  
>>>> the
>>>> basic problem was that the package "grid" was not found by the  
>>>> packages
>>>> (like "lattice", "Hmisc", etc.) that were part of the  
>>>> dependencies for
>>>> "tseries". So, I tried installing the package "grid" but could  
>>>> not. Here
>>>>
>>
>> Maybe you don't have the header files for compiling?  In any event
>> grid is only installed (see below)
>>
>>
>>>> is what I did (and the result):
>>>>
>>>> $ sudo R
>>>>
>>>> Once in R, I did
>>>>
>>>>
>>>>
>>>>> install.packages("grid", dep=TRUE)
>>>>>
>>>>>
>>>> And this is what I got as error message
>>>>
>>>> Warning in install.packages("grid", dep = TRUE) :
>>>>          argument 'lib' is missing: using /usr/local/lib/R/site- 
>>>> library
>>>> --- Please select a CRAN mirror for use in this session ---
>>>> Loading Tcl/Tk interface ... done
>>>> dependency '???grid???' is not available
>>>>
>>>> How should I proceed?
>>>>
>>>>
>>> I think this is Dirk's way of shooting you in the foot... Debian/ 
>>> Ubuntu
>>> has a split between packages r-base and r-recommended, which is  
>>> not The
>>>
>>
>> Not exactly.
>>
>> 'r-base' depends on r-base-core, r-recommended and many other things.
>> You have the option of only installing r-base-core, but if you start
>> with r-base, things just work. [1]
>>
>> Moreover, the r-base-core package _contains_ grid:
>>
>> 	 edd at basebud:~> dpkg -L r-base-core | grep grid | wc -l
>> 	 197
>>
>>
> Yes, I goofed there. Apologies, you're not shooting users in the feet
> (not that way anyway).
>
> However, the README for ubuntu has
>
> sudo apt-get install r-base r-recommended
>
> which is a bit misleading if one depends on the other.

True. I seem to recall I copied this from some other README --- or is  
it just how I always installed R? In any case, I'll delete the "r- 
recommended" part from the README.

>
>
>> So to make it as plain as possible:
>>
>>    i)  what is in R-$VERSION/src/library/ goes into r-base-core
>>
>>    ii) with the exception of R-$VERSION/src/library/Recommended
>>        where each packages goes into its own r-cran-$package as
>>        eg r-cran-boot, r-cran-cluster, ...
>>
>> In any event, r-cran-tseries has been available for years so wgar
>> Deepankar wants here
>>
>> 	  $ sudo apt-get install r-cran-tseries
>>
>> Dirk
>>
>> [1] The most common gotcha is that people forget the other meta
>> package r-base-dev that Doug created years ago -- you need it to
>> ensure the appropriate -dev packages are installed too.
>>
>>
>>
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.

---
   Vincent Goulet, Professeur agrégé
   École d'actuariat
   Université Laval, Québec
   Vincent.Goulet at act.ulaval.ca   http://vgoulet.act.ulaval.ca



More information about the R-help mailing list