Skip to content

Package Build Recommendations

3 messages · Glenn Schultz, Charles Determan, Duncan Murdoch

#
Hi All,

I have my R package built and it passes the CRAN tests. ?Now, I have a question. ?The file structure is not standard. ?There are addition data files as follows outlined below. ?Each, if you will, represents separation of concerns with respect to structured securities like MBS and REMICs (CMOs). ?They referenced via connection in the software via a connection string ~/users/BondLab. ?I am looking for recommendations to create the directory and copy the appropriate folders with their data to a user directory on install. ?Any help will be appreciated.

Glenn ?

BondData
Groups
PrepaymentModel
REMIC
RDME
RAID
RatesData
Scenario
Schedules
Tranches
Waterfall
#
Hi Glenn,

Generally data files are stored in the 'data' directory.  If you visit
Hadley's R packages site on the data page (http://r-pkgs.had.co.nz/data.html)
this is described quite clearly.  You can use the devtools package
functions like `use_data` to have data files properly stored in your
package.

Cheers,
Charles
On Tue, May 5, 2015 at 7:16 PM, Glenn Schultz <glennmschultz at me.com> wrote:

            

  
  
#
On 05/05/2015 8:16 PM, Glenn Schultz wrote:
As Charles said, you can put them in the data directory, but there are 
restrictions on the type of files that can be there -- see Writing R 
Extensions.

An alternative is to put them in a directory with a name of your choice 
below the "inst" directory.  (Don't choose a name that conflicts with a 
standard one.)  On installation, it will be copied up a level, and the 
system.file() function will be able to find it.

Duncan Murdoch