Data Science Desktop Survival Guide
by Graham Williams
Working with the Library
) to introduce a comment which is ignored by R—R will not attempt to understand the comments as commands. Comments are there to assist the human reader in understanding our programs.
# Load packages required for this script.
library(rattle) # The weatherAUS dataset and normVarNames().
library(readr) # Efficient reading of CSV data.
library(dplyr) # Data wrangling and glimpse().
library(ggplot2) # Visualise data.
library(magrittr) # Pipes %>%, %<>%, %T>%, %$%.
In starting up an R session (for example, by starting up ) we can enter the above library() commands into an R script file created using the New R Script File menu option in and then ask to Run the commands. will send each command to the R Console which sends the command on to the R software. It is the R software that then runs the commands. If R responds that the package is not available then the package will need to be installed, which we can do from 's Tools menu or by directly using utils::install.packages() as we saw above.