Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


In R to use a library it must be loaded using the 'library' function. To be able to load a library it must have been previouly installed. Boxes with grey background contain code snippets.

...

Div
stylebackground-color: #F8F9F9; border: 1px solid #666; font-size: 12px; padding: 0.5rem 0.5rem;
## Select the repository (i.e. CRAN mirror URL)
#my.repos = "https://cloud.r-project.org/"
#my.repos = "https://cran.csiro.au/"  # Example of an Australian mirror



Currently ausplotsR must be installed directly from github using the ‘devtools’ package, which must have been previously installed. The code below installs the 'devtools' package. Rather than directly providing the URL for a CRAN mirror, we could have provided the variable 'my.repos' to which we assigned a mirror above. 

...

Div
stylebackground-color: #F8F9F9; border: 1px solid #666; font-size: 12px; padding: 0.5rem 0.5rem;
## Install directly from github using the 'devtools' package
## Thus, 'devtools' must be previouly installed
install.packages("devtools", repos="https://cloud.r-project.org/")



The next steps are to load the 'devetools' library and install the 'ausplotsR' package from GitHub. The GitHub site for ausplotsR contains the latest developments and information on the package; it can be found at this link.

...

Div
stylebackground-color: #F8F9F9; border: 1px solid #666; font-size: 12px; padding: 0.5rem 0.5rem;
library(devtools)
install_github("ternaustralia/ausplotsR", build_vignettes = TRUE)



Now the 'ausplotsR' library can be loaded

...

Div
stylebackground-color: #F8F9F9; border: 1px solid #666; font-size: 12px; padding: 0.5rem 0.5rem;
## Load the package
library(ausplotsR)