Packages

Builder reads your R files from the srcr (default) directory and writes the output to the R (default) directory.

./builder -input srcr -output R

This allows building R packages from multiple, nested directories such as:

srcr
├── main.R
└── sub
    └── main.R

That will produce:

R
├── main.R
└── sub-main.R

Note that the file order is preserved, though it’s unlikely to matter in an R package.

Creating a Package

Use -create to scaffold a new R package with builder support:

./builder -create mypackage

This creates:

mypackage
├── DESCRIPTION
├── .Rbuildignore
├── builder.ini
├── R/
└── srcr/

Then navigate to the package and start building:

cd mypackage && builder