[R] package installation from source

Duncan Murdoch murdoch at stats.uwo.ca
Fri Oct 16 17:01:59 CEST 2009


On 10/16/2009 9:31 AM, Petr PIKAL wrote:
> Dear all
> 
> I noticed from NEWS 2.11.0,dev
> SIGNIFICANT USER-VISIBLE CHANGES
> 
>     o   Packages must have been installed under R 2.10.0 or later, as
>         the current help system is the only one now supported.
> 
> So I tried to follow instructions in manual, Duncan Murdoch presentation 
> and help pages to prepare and accomplish installation of a set of 
> functions I use. However in R 2.11.0dev and too in R 2.10.0dev I was not 
> able to finish it.
> 
> I installed Rtools210 
> 
> I opened commander window and or R program with --vanilla option.
> 
> I coppied all my functions and data to R and run package.skeleton
> 
>>  package.skeleton(list=ls(), name="fun")
> Creating directories ...
> Creating DESCRIPTION ...
> Creating Read-and-delete-me ...
> Saving functions and data ...
> Making help files ...
> Done.
> Further steps are described in './fun/Read-and-delete-me'.
> 
> Package structure seems to be ok
> 
> 
>> list.files("D:/temp/fun", recursive=TRUE)
>   [1] "data/modely1.rda"     "data/modely2.rda"     "data/modely3.rda" 
>   [4] "data/stand.rda"       "DESCRIPTION"          "man/addLine.Rd" 
>   [7] "man/azce.Rd"          "man/bayerf.h.Rd"      "man/bayerf.Rd" 
>  
> <snip>
> 
> [112] "R/tridy.R"            "R/trigrid.R"          "R/truehist.R" 
> [115] "R/voda.tlak.R"        "R/vodiv2rozkl.R"      "R/warmcold.R" 
> [118] "R/weighted.mean.R"    "R/weighted.var.R"     "R/write.excel.R" 
> [121] "Read-and-delete-me" 
>> 
> 
> I changed PATH by
> 
> PATH = D:\programy\Rtools\bin; D:\programy\Rtools\perl\bin; 
> D:\programy\Rtools\MinGW\bin; D:\programy\R-2.10.0dev\bin; %PATH%
> 
> When I try to do
> 
>> install.packages("D:/temp/fun", repos=NULL, type="source")
> sh nenˇ n zvem vnitýnˇho ani vnŘjçˇho pýˇkazu,
> spustiteln‚ho programu nebo d vkov‚ho souboru.
> Warning message:
> In install.packages("D:/temp/fun", repos = NULL, type = "source") :
>   installation of package 'D:/temp/fun' had non-zero exit status
> 
> which basically tells that sh is not a name of command, exe or bat file.

There should be a sh.exe in d:\programy\Rtools\bin if that's where you 
installed the Rtools.  Are you sure you have the path set the way you 
think you do?  Remember that PATH is an environment variable, and 
environment variable settings are local:  so setting the PATH in a CMD 
window has no effect on R or any other command window.  You need to use 
the Control Panel to set the default system path, and then restart any 
process that needs to see it.

Duncan Murdoch

> 
> The same I get when I try to run
> 
> D:\temp R CMD INSTALL fun
> 
> Please can you give me any suggestion for making installation work. I 
> remember when going from 1.9 to 2.0 versions it was also necessary to 
> install my bunch of functions, however at that time I need to use 
> something like make, make install  or so and gather all necessary programs 
> myself.
> 
> Best regards
> Petr
> 
> 
> 
> 
> 
> ______________________________________________
> 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.




More information about the R-help mailing list