Skip to content

[R-pkg-devel] In R package directory, where to put results for some long-taking simulations I want to use in README / vignette?

3 messages · Duncan Murdoch, Marta Karaś

#
For my R package, I want to demonstrate some benchmark results that take a
while to generate. I want to present the results in both README and
vignette.

I thought a way to go is to have a README.Rmd code chunk with generates the
results with `eval = FALSE`, which I run in R console and save the table in
some place within a package, and then read the saved table and display it
in both README.Rmd (in a next chunk) and in the vignette Rmd file.

Questions:

   - What is the proper subdirectory (naming, location) I should save
   the results into?
   - Should I out this subdirectory into .gitignore, or rather keep them
   (i.e., they would be available to anybody who downloads package's source
   files from CRAN?)

Thank you,
Marta
#
On 17/12/2018 12:54 PM, Marta Kara? wrote:
either data/ or inst/<your choice>/ would be fine.  Use data if you want 
these to be easily available to package users, some private name if you 
don't.
What you put in .gitignore is up to you.  Do you want version control on 
these files?  Usually derived objects like your benchmark results aren't 
put in version control, you just put in the code to generate them.  But 
in this case, you might find it interesting to compare current results 
with historical ones, and version control would let you do that.

Duncan Murdoch
#
Cool, thanks! 100% clear and very helpful, I appreciate your answer a lot!

Bests / Pozdrawiam,
Marta Karas





On Mon, Dec 17, 2018 at 3:58 PM Duncan Murdoch <murdoch.duncan at gmail.com>
wrote: