Dear All, What is the easiest way to create a package bundle in R? I have three packages I would like to group together in which one package will depends on three others. It looks like from http://tolstoy.newcastle.edu.au/R/help/01a/0284.html, all that is required is to put require in the .First? I wonder how one can create a package so that when it is downloaded, all the other packages are downloaded and installed as well? In my case, the three sub packages are not written by me and are already in R so I would like to keep the current versions as part of the bundle rather than allow them to get updated so there will not be compatibility problems? I am aware there is a writing R extensions guide but it seems to be geared towards a more advanced user rather than beginner like me? Thanks in advance. Steve. [[alternative HTML version deleted]]
Steve Su wrote:> Dear All, > > > > What is the easiest way to create a package bundle in R? I have three > packages I would like to group together in which one package will > depends on three others. It looks like from > > http://tolstoy.newcastle.edu.au/R/help/01a/0284.html, all that is > required is to put require in the .First? I wonder how one can create a > package so that when it is downloaded, > > all the other packages are downloaded and installed as well? In my case, > the three sub packages are not written by me and are already in R so I > would like to keep the currentPerhaps you simply want to use install.packages("the_package", dependencies = TRUE) rather than building a package bundle of packages you are not maintaining yourself. Uwe Ligges> versions as part of the bundle rather than allow them to get updated so > there will not be compatibility problems? > > > > I am aware there is a writing R extensions guide but it seems to be > geared towards a more advanced user rather than beginner like me? > > > > Thanks in advance. > > > > Steve. > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
Hi Steve, Are you sure you want a bundle? If you are writing your own package Foo that depends on two pacakges already available via CRAN, then all you need to do is list those two pacakges in the Depends field of your package's DESCRIPTION file. This will give you the automatic downloading of Foo's dependencies when a user does: install.packages("foo", dependencies=TRUE) As for the versions, you can specify required versions also in the Depends field (see the writing R extensions guide). + seth