How to set up an own package repository

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to set up an own package repository

Janko Thyson
Dear List,

 

I'd like to set up a package repository so I can use install.packages() on
it for home-grown packages. I set up an AMPP infrastructure on a windows box
already, but I'm pretty lost with respect to what to do next as I didn't do
any web-programming/admin yet. Could anyone recommend some r-specific
tutorials or has a couple of suggestions for me? I've had a look at the
official R manual, but it just describes the required repository structure,
but not how to implement that. I'd also be willing to dive into SVN and
alikes if you think that's best practice.

 

Thanks for any help whatsoever,

Janko


______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to set up an own package repository

Simon Urbanek

On Sep 17, 2010, at 6:16 AM, Janko Thyson wrote:

> Dear List,
>
>
>
> I'd like to set up a package repository so I can use install.packages() on
> it for home-grown packages. I set up an AMPP infrastructure on a windows box
> already, but I'm pretty lost with respect to what to do next as I didn't do
> any web-programming/admin yet. Could anyone recommend some r-specific
> tutorials or has a couple of suggestions for me? I've had a look at the
> official R manual, but it just describes the required repository structure,
> but not how to implement that. I'd also be willing to dive into SVN and
> alikes if you think that's best practice.
>

All you need is a web space. There are so many way to get one (many hosting provides, renting a server, accessing your home machine if your ISP allows it ...) that it's impossible to give a generic instruction. Once you get a webspace, it's just a matter of creating the directory structure described in R-admin in that space. Most hosting provides have web tools for that so you create the directories and upload your files.

What you are trying to achieve is that if you have let's say
http://someHosting.com/myAccount
as the root for your web space to support
install.packages("myPackage",,"http://someHosting.com/myAccount")
then you want
http://someHosting.com/myAccount/src/contrib/PACKAGES
to exist and have the list of the packages (see R-admin) and your package sources in there. Analogously you want to create the binaries (Windows, Mac OS X etc.) in the corresponding bin/.../contrib folders so other users can install it without type='source'.

Of course you can use install.packages("myPackage",,"file:///myRepository") and have the files locally in /myRepository/src/contrib if you're only concerned about your local use.

Cheers,
Simon

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to set up an own package repository

bbolker
In reply to this post by Janko Thyson
Janko Thyson <janko.thyson <at> ku-eichstaett.de> writes:

>
> Dear List,
>
> I'd like to set up a package repository so I can use install.packages() on
> it for home-grown packages. I set up an AMPP infrastructure on a windows box
> already, but I'm pretty lost with respect to what to do next as I didn't do
> any web-programming/admin yet. Could anyone recommend some r-specific
> tutorials or has a couple of suggestions for me? I've had a look at the
> official R manual, but it just describes the required repository structure,
> but not how to implement that. I'd also be willing to dive into SVN and
> alikes if you think that's best practice.

  It's pretty easy.  For example, I have a directory hierarchy

R/bin/{windows,windows64}
R/src/contrib/

  in each bottom-level directory I have the appropriate zipped
binaries or tar.gz sources, along with a PACKAGES file generated
by the write_PACKAGES function in the tools package.
 
  see section 6.6 of the R-admin manual.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to set up an own package repository

Friedrich Leisch
In reply to this post by Janko Thyson
>>>>> On Fri, 17 Sep 2010 12:16:47 +0200,
>>>>> Janko Thyson (JT) wrote:

  > Dear List,
  > I'd like to set up a package repository so I can use install.packages() on
  > it for home-grown packages. I set up an AMPP infrastructure on a windows box
  > already, but I'm pretty lost with respect to what to do next as I didn't do
  > any web-programming/admin yet. Could anyone recommend some r-specific
  > tutorials or has a couple of suggestions for me? I've had a look at the
  > official R manual, but it just describes the required repository structure,
  > but not how to implement that. I'd also be willing to dive into SVN and
  > alikes if you think that's best practice.

If all machines involved can mount the repository as a network drive
you need no webserver at all, just use a file:/path/to/repository URL
for the repository.

If you want a full featured web frontend you may want to have a look
at the Bioconductor scripts for generating repositories:

http://bioconductor.org/packages/2.7/bioc/html/biocViews.html

and especially

http://bioconductor.org/packages/2.7/bioc/vignettes/biocViews/inst/doc/createReposHtml.pdf

The scripts for CRAN are also in R but very specific for CRANs needs ...

Best,
Fritz

--
-----------------------------------------------------------------------
Prof. Dr. Friedrich Leisch

Institut für Statistik                          Tel: (+49 89) 2180 3165
Ludwig-Maximilians-Universität                  Fax: (+49 89) 2180 5308
Ludwigstraße 33
D-80539 München                     http://www.statistik.lmu.de/~leisch
-----------------------------------------------------------------------
   Journal Computational Statistics --- http://www.springer.com/180 
          Münchner R Kurse --- http://www.statistik.lmu.de/R

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to set up an own package repository

Janko Thyson
Thank you very much for the advice!

Cheers,
Janko

> -----Ursprüngliche Nachricht-----
> Von: Friedrich Leisch [mailto:[hidden email]]
> Gesendet: Freitag, 17. September 2010 16:39
> An: Janko Thyson
> Cc: r-devel@r-project. org
> Betreff: Re: [Rd] How to set up an own package repository
>
> >>>>> On Fri, 17 Sep 2010 12:16:47 +0200,
> >>>>> Janko Thyson (JT) wrote:
>
>   > Dear List,
>   > I'd like to set up a package repository so I can use
> install.packages() on
>   > it for home-grown packages. I set up an AMPP infrastructure on a
> windows box
>   > already, but I'm pretty lost with respect to what to do next as I
> didn't do
>   > any web-programming/admin yet. Could anyone recommend some r-
> specific
>   > tutorials or has a couple of suggestions for me? I've had a look at
> the
>   > official R manual, but it just describes the required repository
> structure,
>   > but not how to implement that. I'd also be willing to dive into SVN
> and
>   > alikes if you think that's best practice.
>
> If all machines involved can mount the repository as a network drive
> you need no webserver at all, just use a file:/path/to/repository URL
> for the repository.
>
> If you want a full featured web frontend you may want to have a look
> at the Bioconductor scripts for generating repositories:
>
> http://bioconductor.org/packages/2.7/bioc/html/biocViews.html
>
> and especially
>
> http://bioconductor.org/packages/2.7/bioc/vignettes/biocViews/inst/doc/
> createReposHtml.pdf
>
> The scripts for CRAN are also in R but very specific for CRANs needs
> ...
>
> Best,
> Fritz
>
> --
> -----------------------------------------------------------------------
> Prof. Dr. Friedrich Leisch
>
> Institut für Statistik                          Tel: (+49 89) 2180 3165
> Ludwig-Maximilians-Universität                  Fax: (+49 89) 2180 5308
> Ludwigstraße 33
> D-80539 München                     http://www.statistik.lmu.de/~leisch
> -----------------------------------------------------------------------
>    Journal Computational Statistics --- http://www.springer.com/180
>           Münchner R Kurse --- http://www.statistik.lmu.de/R
>
______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to set up an own package repository

Spencer Graves-2
  This is also discussed in "Creating R Packages, Using CRAN, R-Forge,
And Local R Archive Networks And Subversion (SVN) Repositories ” by
Spencer Graves and Sundar Dorai-Raj, available from CRAN -> contributed
documentation
"http://cran.fhcrc.org/doc/contrib/Graves+DoraiRaj-RPackageDevelopment.pdf".



Hope this helps. Spencer


On 9/17/2010 9:27 AM, Janko Thyson wrote:

> Thank you very much for the advice!
>
> Cheers,
> Janko
>
>> -----Ursprüngliche Nachricht-----
>> Von: Friedrich Leisch [mailto:[hidden email]]
>> Gesendet: Freitag, 17. September 2010 16:39
>> An: Janko Thyson
>> Cc: r-devel@r-project. org
>> Betreff: Re: [Rd] How to set up an own package repository
>>
>>>>>>> On Fri, 17 Sep 2010 12:16:47 +0200,
>>>>>>> Janko Thyson (JT) wrote:
>>    >  Dear List,
>>    >  I'd like to set up a package repository so I can use
>> install.packages() on
>>    >  it for home-grown packages. I set up an AMPP infrastructure on a
>> windows box
>>    >  already, but I'm pretty lost with respect to what to do next as I
>> didn't do
>>    >  any web-programming/admin yet. Could anyone recommend some r-
>> specific
>>    >  tutorials or has a couple of suggestions for me? I've had a look at
>> the
>>    >  official R manual, but it just describes the required repository
>> structure,
>>    >  but not how to implement that. I'd also be willing to dive into SVN
>> and
>>    >  alikes if you think that's best practice.
>>
>> If all machines involved can mount the repository as a network drive
>> you need no webserver at all, just use a file:/path/to/repository URL
>> for the repository.
>>
>> If you want a full featured web frontend you may want to have a look
>> at the Bioconductor scripts for generating repositories:
>>
>> http://bioconductor.org/packages/2.7/bioc/html/biocViews.html
>>
>> and especially
>>
>> http://bioconductor.org/packages/2.7/bioc/vignettes/biocViews/inst/doc/
>> createReposHtml.pdf
>>
>> The scripts for CRAN are also in R but very specific for CRANs needs
>> ...
>>
>> Best,
>> Fritz
>>
>> --
>> -----------------------------------------------------------------------
>> Prof. Dr. Friedrich Leisch
>>
>> Institut für Statistik                          Tel: (+49 89) 2180 3165
>> Ludwig-Maximilians-Universität                  Fax: (+49 89) 2180 5308
>> Ludwigstraße 33
>> D-80539 München                     http://www.statistik.lmu.de/~leisch
>> -----------------------------------------------------------------------
>>     Journal Computational Statistics --- http://www.springer.com/180
>>            Münchner R Kurse --- http://www.statistik.lmu.de/R
>>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>


--
Spencer Graves, PE, PhD
President and Chief Operating Officer
Structure Inspection and Monitoring, Inc.
751 Emerson Ct.
San José, CA 95126
ph:  408-655-4567

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel