Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R - setting up my own CRAN repository

Tags:

package

r

cran

I want to set up a local CRAN repository . I want to put just one package in this repository ( let's call it MyPackage ). The reason I'm doing this is that I want to share this package with people at my company. By the way - we all use Ubuntu Linux. I have already done this:

  • I have a web server ( BOA web server ) and made a web folder called R. Made folder src and contrib.
  • In the contrib folder I put my package MyPackage ( tar.gz) plus the PACKAGES file.

However, when I do this:

install.packages("MyPackage", repos = "127.0.0.1/R" ) 

it does not work ;

Warning: unable to access index for repository [ ]
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
  package ‘MyPackage’ is not available (for R version 2.13.1)

Can you guys guide me a bit and tell me what is the correct folder structure ? Thanks.

like image 236
MadSeb Avatar asked Aug 13 '12 01:08

MadSeb


2 Answers

See "Section 6.6 Setting up a package repository" of the R Admin manual.

Edit some three+ years later: We now have the drat package which automates creating a repository, and can use GitHub in a clever way to host it for you.

like image 194
Dirk Eddelbuettel Avatar answered Oct 21 '22 17:10

Dirk Eddelbuettel


You might just need to specify the URL properly; http://127.0.0.1/R.

Also, make sure you can access that URL in your browser.

like image 38
Aaron left Stack Overflow Avatar answered Oct 21 '22 18:10

Aaron left Stack Overflow