Re: [R-pkg-devel] Is it possible to reverse engineer a package from the installed library directory ?

2016-03-23 Thread Joshua Ulrich
On Wed, Mar 23, 2016 at 9:25 PM, Ben Bolker wrote: > > You could take your old install and do this: > > library("your_package") > funs <- ls(pos="package:your_package") > dump(funs,"your_package.R") > > that wouldn't recreate documentation, NAMESPACE files, etc., but it would > be a start

Re: [R-pkg-devel] Is it possible to reverse engineer a package from the installed library directory ?

2016-03-23 Thread Ben Bolker
You could take your old install and do this: library("your_package") funs <- ls(pos="package:your_package") dump(funs,"your_package.R") that wouldn't recreate documentation, NAMESPACE files, etc., but it would be a start. On 16-03-23 04:43 PM, Paul Hurley wrote: Several years ago I

[R-pkg-devel] Is it possible to reverse engineer a package from the installed library directory ?

2016-03-23 Thread Paul Hurley
Several years ago I assembled some of my own most used code into a package, and had that installed on my machine. Since then I have lost the source files, but still have the package installed in an old v2.x R installation. I now need to use the package in my current R install, which is v3.1, and

Re: [R-pkg-devel] Data-generating scripts in R packages

2016-03-23 Thread Kevin Coombes
Hi, I'm going to start by summarizing the suggestions (for where to put the script) that have been presented so far: [1] in the /demo directory [2] in /inst/SOMETHING, where Dirk lists four possible values for SOMETHING [3] in /R , but hidden using .Rbuildignore [4] in the Example section of a

Re: [R-pkg-devel] Data-generating scripts in R packages

2016-03-23 Thread Thierry Onkelinx
Dear Kevin, I would convert the script into a function and add it to the R folder. This makes it easy to document the script using the standard R help files. Then add the function to the examples in the helpfile of the data in a \dontrun{}. Then it is clear to to user how the data was generated.

Re: [R-pkg-devel] Data-generating scripts in R packages

2016-03-23 Thread Enrico Schumann
On Tue, 22 Mar 2016, Kevin Coombes writes: > Hi, > > I'm currently developing an R package that includes a small data set > along with the functions that I want to export. I have an R script > that generates the data set; the computation time is long (well, > relative to the size of the data set)