Scaffold your new R package
JavaScript R
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 1 commit ahead of kirillseva:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
function
test
tests
.editorconfig
.gitattributes
.gitignore
.jshintrc
.travis.yml
.yo-rc.json
README.md
package.json

README.md

R package generator

This generator scaffolds the files for your new R project. The resulting file structure looks like this:

{packagename}
|
├── DESCRIPTION
├── NAMESPACE
├── NEWS.md
├── R
│   ├── pending.R
│   └── {packagename}-package.R
├── README.md
├── man
│   └── {packagename}.Rd
└── tests
    ├── test-all.R
    └── testthat
        └── test-pending.R

Included out of the box

Requires the following to be installed:

Installation on mac:

# install dependencies
brew install npm # sudo apt-get install npm on ubuntu
sudo npm install -g yo generator-newpackage

# start using
cd package/directory
yo newpackage # creates a package in the current folder
# or
yo newpackage packageName # creates a new folder

# subgenerators
yo newpackage:function somefunction # creates R/somefunction.R
yo newpackage:test sometest # creates tests/testthat/sometest.R