View source: R/InitiatePackage.R
This function sets up a package (initated in github and RStudio as described below) as follows: - Copies in basic function templates (with roxygen comments). - Copies in ‘TextDescription.txt’, ‘TextOverview.txt’ and ‘TextTitle.txt’ templates to the root. - Creates descritpion and -package.rd files using the Pmisc functions. - Runs roxygen to generate function documentation. - Sets up github if a username is provided: - Creates github README.rd file - Adds the github repository url with 'git remote add origin' - Performs the first commit. - Generates a ‘REFRESH’ file tailored with the package name, and places in the package root directory. To setup a blank project in github and RStudio, to run this function on: 1) Go to your github account and create a new repository with the same name as the package you want to initiate. NOTE: Must be empty. 2) Open RStudio. 3) File -> New Project -> New Directory -> R Package Check ‘Create a git repository for this project.’
1 2 3 | InitiatePackage(package.name,
package.location = "/Users/pauln/Dropbox/Work Projects/R Packages",
github.username = "pjnewcombe", version = 0.1, reconnection = FALSE)
|
package.name |
The name of the package |
package.location |
Directory all R packages are stored in. |
github.username |
Github account username. Set to NULL to skip linking to a github repository of the same name. |
version |
Version number which today's date will be appended to. Default is 0.1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.