Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kirillseva/generator-newpackage
Scaffold your new R package
https://github.com/kirillseva/generator-newpackage
Last synced: 16 days ago
JSON representation
Scaffold your new R package
- Host: GitHub
- URL: https://github.com/kirillseva/generator-newpackage
- Owner: kirillseva
- Created: 2015-03-02T15:13:50.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-28T20:44:37.000Z (over 9 years ago)
- Last Synced: 2024-11-12T07:45:01.510Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 169 KB
- Stars: 10
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - kirillseva/generator-newpackage - Scaffold your new R package (JavaScript)
README
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
* Easy installation/distribution using [**devtools**](https://github.com/hadley/devtools)::install()
* Documentation with [**roxygen2**](https://github.com/klutometis/roxygen)
* Tests using [**testthat**](https://github.com/hadley/testthat)
* *.travis.yml* config for [Travis-CI](https://travis-ci.org/)
* [Coveralls](https://coveralls.io/) integration with [**covr**](https://github.com/jimhester/covr)Requires the following to be installed:
* Obviously, [R](http://www.r-project.org/)
* [npm](https://www.npmjs.com/)
* [**devtools**](https://github.com/hadley/devtools),
[**roxygen2**](https://github.com/klutometis/roxygen),
[**testthat**](https://github.com/hadley/testthat) R packages (not required, but would make your life easier)Installation on mac:
```r
# 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
```