Coster, Albart
2007-Jul-30 07:05 UTC
[Rd] developing a package: increase the number of functions
Dear list, I am trying to develop a package. I used the function package.skeleton to make the directory tree of the package and then build and compiled the package as described (I hope). Now, I would like to increase the number of functions in the package without overwriting the existing package directory tree, so I put these new functions in the directory R of the tree. When I then build and install the package, I can not find the new functions, so apparently they are omitted from the installation. My question is: why does this occur? What should I do to get these new functions also installed? (I am using R 2.4.1) Thanks in advance, Albart Coster
Prof Brian Ripley
2007-Jul-30 07:31 UTC
[Rd] developing a package: increase the number of functions
On Mon, 30 Jul 2007, Coster, Albart wrote:> Dear list, > > I am trying to develop a package. I used the function package.skeleton > to make the directory tree of the package and then build and compiled > the package as described (I hope). Now, I would like to increase the > number of functions in the package without overwriting the existing > package directory tree, so I put these new functions in the directory R > of the tree. When I then build and install the package, I can not find > the new functions, so apparently they are omitted from the installation.What file name(s) did you use? See 'Writing R Extensions' for allowed names, and also remember you need to add documentation for those functions. Do you have a NAMESPACE?> My question is: why does this occur? What should I do to get these new > functions also installed? > > (I am using R 2.4.1)Why? R 2.5.1 is current. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Gregor Gorjanc
2007-Jul-31 13:48 UTC
[Rd] developing a package: increase the number of functions
Prof Brian Ripley <ripley <at> stats.ox.ac.uk> writes: ...> > Do you have a NAMESPACE?Hi Albart! About the NAMESACE issue. Functions that are specified in NAMESPACE are available when you install a package, while internal ones can only be accessed with myInternalFun:::myPackage Gregor