A collection of datasets and utility functions for R computer labs in the Department of Mathematical Sciences at Durham University.
durham
library (and other preinstalled libraries)If you are in a computer lab in the University then you can easily access the durham
library (or the many other libraries preinstalled on drive T: on CIS computers):
library(durham)
without getting an error. There are many libraries pre-installed as well (look in the folder where you found "Setup R for Maths").First you will need to download a copy of R from CRAN. We strongly recommend using the RStudio interface, which can be downloaded from RStudio directly.
durham
package installationThe easiest way to download the package to your own computer is by making use of the remotes
R package. Run the following commands in R:
install.packages("remotes")
remotes::install_github("louisaslett/durham-Rpkg")
If you encounter an error similar to:
ERROR: failed to create lock directory
then please try again with this slightly different install command:
r
remotes::install_github("louisaslett/durham-Rpkg", INSTALL_opts = "--no-lock")
If you encounter the error:
Error in strptime(xx, f, tz = tz) :
(converted from warning) unable to identify current timezone 'C':
please set environment variable 'TZ'
Error: Failed to install 'durham' from GitHub:
(converted from warning) installation of package
then please run the following command in R before attempting again:
r
Sys.setenv(TZ='GMT')
If you encounter the error:
Downloading GitHub repo louisaslett/durham-Rpkg@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet, :
cannot open URL 'https://api.github.com/repos/louisaslett/durham-Rpkg/tarball/HEAD'
then please disable your VPN and try again.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.