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)

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

2016-03-22 Thread Dirk Eddelbuettel
Kevin, The inst/ directory gives a good handle to pass arbitrary directory layouts of your choosing through. You just need to avoid inst/data as it would clash with an existing data/ directory. I think I have seen inst/rawData inst/extData# as in 'external data' and of

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

2016-03-22 Thread Jack Wasey
You can leave them in R/ (and write them as functions) but use .Rbuildignore to exclude them from the distributed package. People can use the source, eg github, to regenerate the package and all its data if they wish. This way, R CMD check and tests can cover them easily while developing. However,

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

2016-03-22 Thread Brian G. Peterson
On Tue, 2016-03-22 at 08:52 -0400, Kevin Coombes wrote: > 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 dat

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

2016-03-22 Thread Kevin Coombes
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). So, my plan is to run the script and save() the d