[R] warnings and errors with R CMD INSTALL

Uwe Ligges ligges at statistik.uni-dortmund.de
Wed Jan 5 11:37:36 CET 2005


thomas wrote:

> Hello,
> 
> Am Mittwoch, den 05.01.2005, 06:47 +0000 schrieb Prof Brian Ripley:
> 
>>On Wed, 5 Jan 2005, thomas wrote:
> 
> 
>>>>But there is no package `pkg1' on CRAN.  Try a real name like
>>>>
>>>>install.packages("tree")
>>>
>>>Well, of cause I didn't want install pkg1 or pkg2,
>>>the precise commandline was:
>>>
>>>1. R CMD INSTALL epitools_0.3-3.tar.gz
>>
>>Have you downloaded the file first to the current directory?
> 
> Well, that was the crucial point, I simply didn't get aware or simply
> over-read this issue (what a shame!)
> 
> 
>>>and
>>>
>>>2.  install.packages("accuracy", "zoo", "abind")
>>
>>The syntax is install.packages(c("accuracy", "zoo", "abind"))
> 
> 
> Well, given the examples in administration manual and RNews 3/3, your
> example looks a bit different (the c !). I didn't figure out that you'll
> have to use this to install packages accurately

?install.packages tells us that its first argument "pkgs" has to be a 
"character vector".
The examples in the references mentioned above are using one package, 
hence something like "accuracy" as a one element character vector is 
sufficient, for more, you have to use the c() function in order to 
provide a vector of characters (names of the packages to install).



> 
>>[I did suggest an example you could have tried, deliberately with one 
>>package.  I don't get the error message you said you got from your line.]
> 
> 
> Well, that's correct, now with your kind advice this isn't a problem
> anymore
> 
> 
> 
> Finally, it seems to me that the install.package should help to stay
> tuned with regards to required dependencies.
> Just found out, that some dependency descriptions of packages are
> somewhat missing some necessities,
> 
> i.e. RODBC package descriptions mentions:
> (..)
>  R (>= 1.9.0)
> (..)
> 
> When trying to install RODBC I had to learn that on my system there is:
> 
> configure: error: "no ODBC driver manager found"
> ERROR: configuration failed for package 'RODBC'
> 
> So, R CMD INSTALL seemingly doesn't take care of missing dependencies
> except given an error message.


The R scripts are checking dependencies within R (R version, packages, 
etc.), but not external dependencies (compiler, system libraries, etc.). 
The latter are checked, e.g., in configure scripts within the packages, 
as it was perfectly done in your example.

How should R know a) how to look whether ODBC has been installed 
properly on your machine and b) how to install ODBC for you (in 
particular on the specific platform/OS you are using).
That's why some packages are making use of configure scripts.


Uwe Ligges


> Since I am relatively new to R I am kind of lost to figure out these
> dependencies on my own (think its getting better gradually).
>
> Anyway,
> 
> thanks for immediate response
> 
> 
> Thomas
> 
> ______________________________________________
> 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




More information about the R-help mailing list