To print a listing of all examples of a chapter, use ch20()
.
To run all the examples of ch20()
, use example(ch20)
.
Examples
if (interactive()) {
# Chapter 20 - Ten Tips on Working with Packages
## Poking Around the Nooks and Crannies of CRAN
options("repos" = c(CRAN = "https://cran.ma.imperial.ac.uk/"))
## Finding Interesting Packages
## Installing Packages
if (FALSE) {
install.packages("fortunes")
}
## Loading Packages
library("fortunes")
## Reading the Package Manual and Vignette
library(help=fortunes)
if (FALSE) {
vignette("fortunes")
}
## Updating Packages
if (FALSE) {
update.packages()
}
## Unloading Packages
search()
detach(package:fortunes, unload=TRUE)
## Forging Ahead with R-Forge
if (FALSE) {
install.packages("data.table", repos="https://R-Forge.R-project.org")
}
## Conducting Installations from BioConductor
if (FALSE) {
source("https://bioconductor.org/biocLite.R")
}
## Reading the R Manual
}