rstan.package.skeleton {rstan} | R Documentation

## Create a Skeleton for a New Source Package with Stan Programs

### Description

This function is very similar to `package.skeleton` but is designed for source packages that want to include Stan Programs that can be built into binary versions.

### Usage

    rstan.package.skeleton(name = "anRpackage", list = character(),
                           environment = .GlobalEnv, path = ".",
                           force = FALSE, code_files = character(),
                           stan_files = character())

### Arguments

`name, list, environment, path, force, code_files` | Same is in `package.skeleton`
`stan_files` | A character vector with paths to .stan files to include in the package. Otherwise similar to `code_files`.

### Details

This function first calls `package.skeleton` and then adds the files listed in `stan_files` to an exec directory. Finally, it downloads several files from the rstanarm GitHub repository to facilitate building the resulting package. Note that rstanarm is licensed under the GPL >= 3, so package builders who do not want to be governed by that license should not use the downloaded files that contain R code. Otherwise, it may be worth considering whether it would be easier to include your .stan programs and supporting R code in the rstanarm package.

### Value

Used for its side-effects

### See Also

https://github.com/stan-dev/rstanarm/ for an example of how to create a package that contains pre-compilable .stan programs

### Examples

      # See example(package.skeleton)

[Package rstan version 2.12.1 Index]