Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I run package.skeleton without parsing functions into separate files?

Tags:

package

r

Is it possible to run package.skeleton('pkgname') and have all of the .R files end up in a single file or set of files rather than one file per function?

A developer I am working with asked me why I had each function in a separate file and my only rationale was 'that is the default behavior`.

like image 834
David LeBauer Avatar asked Jun 10 '11 16:06

David LeBauer


2 Answers

If you specify a file containing several functions in the code_files argument to package.skeleton, that should just be copied to the R directory in the package.

So, yes.

like image 102
Richie Cotton Avatar answered Oct 06 '22 07:10

Richie Cotton


Don't use package.skeleton. Create the files yourself and use roxygen to create the documentation. It's a much easier workflow in the long run.

like image 31
hadley Avatar answered Oct 06 '22 08:10

hadley