Commit ff7f50d6 authored by Ian Carroll's avatar Ian Carroll

explain configuration

parent f9ba0bd1
# rpackage
This repository contains the absolute minimum content you must add to your
RStudio project to let devtools + Roxygen help you organize and use functions.
It is not a good starting point if you aim to publish a R package, although there's
nothing here in the way of publishing. There's almost nothing here at all, and that's
the point.
## RStudio Configuration
1. Install `devtools` and `roxygen2`.
1. Add a DESCRIPTION to your project.
1. Copy this DESCRIPTION file into your project folder.
1. Change the `Package` variable to your project's name.
1. Close and re-open the project.
1. Configure "Build" actions.
1. Find the new "Build" tab, next to "Environment".
1. Select "More" > "Configure Build Tools..."
1. Make sure you are using Roxygen, and configure it to make your NAMESPACE
file and automatically run with every "Build & Reload"
## Export Functions
In the "R" folder, create one file for every function you want to call directly
for your project. Name each file the same as the function in contains, with a
".R" extension. Each file can contain additional "helper" functions that those
functions call. Add the `#' @export` line just above main function definition.
#' @export
hello <- function() {
say("Hello, world!")
say <- function(x) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment