[R] how to install a locally built package
Uwe Ligges
ligges at statistik.tu-dortmund.de
Thu Sep 15 17:42:44 CEST 2011
On 15.09.2011 17:32, Bond, Stephen wrote:
> Hello useRs,
>
> I am trying to put my funcs in a package to avoid clutter in my workspace as the funcs are now in .Rprofile.
> All plain R code no compilations. Using win XP with a full cygwin install and R2.12
> I first did
>
> package.skeleton("mypack",list="getdfv", namespace=T) # just a single func
>
> which created a folder with the required stuff in it.
> Calling R CMD build creates a tar.gz file with warnings about DOS paths.
>
> Trying to install from the R GUI complains
>> install.packages("mypack",repos="C:/Temp/mypack_1.0.tar.gz")
> Warning: unable to access index for repository C:/Temp/mypack_1.0.tar.gz/bin/windows/contrib/2.12
> Warning message:
> In getDependencies(pkgs, dependencies, available, lib) :
> package 'mypack' is not available
install.packages("C:/Temp/mypack_1.0.tar.gz", repos=NULL, type="source")
seems to be what you want.
Uwe Ligges
> putting the mypack folder in zip and then trying to install from the zip produces no error message but then
>
>> library("mypack")
> Error in library("mypack") : 'mypack' is not a valid installed package
>
> Just putting the folder in the library folder of R did not work either
>
> Finally
> R CMD Install complains about missing title in the Rd file. I do not have a Rd file as the skeleton did not create it.
>
> Please, advise how to make simple R code available to be called without showing in ls()
>
> Thank you.
> Stephen Bond
>
>
> [[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.
More information about the R-help
mailing list