2. Initialising the Rpackage Environment

This next set of instructions assumes that you've already:

  1. Installed R (as well as RStudio, which I highly recommend)
  2. Cloned the Repository

The root directory ($PATH_TO_ROOT = your path) is the full path to the directory of the repository that you just cloned.  Each time you want to use this package, you’ll need to initialise the environment in R.  This loads up all the necessary functions and informs your local machine where all the required directories for code & data are located.  This is similar to a 'require()' or 'library()' command in R.

Inialise by the following:




source(“/Users/[user name]/anusolar/code/rpkg/init.R”)
init(“/Users/[user name]/anusolar/“) # don’t forget the last “/“


source(“\Documents and Settings[user name]\My Documents\anusolar\code\rpkg\init.R”)
init(“\Documents and Settings[user name]\My Documents\anusolar\”)

Having trouble? Comment below!

NEXT up: working with data