Session - Packages
Comprehensive R Archive Network
19,291 packages (March 2023), free and structurally peer reviewed
Many useful packages in development or subject to a lot of change are not on CRAN and are available through GitHub including {NHSRtheme}. These won’t be peer reviewed.
ROpenSci offer a peer reviewed ecosystem of R packages through GitHub including UKHSA’s {fingertipsR}
This needed for every new session/script and is often at the top
Curly brackets around a {package} is used in text as many packages have “real names”
The tidyverse package collects (some of) the most popular
R packages into one.
Also refers to a coding style in R.
Should you use {tidyverse} when many of the packages are redundant?
Clashes occur with the packages which you are notified about, but not with those outside the package
── Attaching core tidyverse packages ────────────────────────────────────────────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.0 ✔ readr 2.1.4
✔ forcats 1.0.0 ✔ stringr 1.5.0
✔ ggplot2 3.4.1 ✔ tibble 3.1.8
✔ lubridate 1.9.2 ✔ tidyr 1.3.0
✔ purrr 1.0.1
── Conflicts ──────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package to force all conflicts to become errors
Warnings - not errors, just information on versions (from an older system)
Warning messages:
1: package ‘tidyverse’ was built under R version 4.0.4
2: package ‘tidyr’ was built under R version 4.0.3
3: package ‘readr’ was built under R version 4.0.3
4: package ‘purrr’ was built under R version 4.0.3
5: package ‘dplyr’ was built under R version 4.0.3
6: package ‘stringr’ was built under R version 4.0.3
Don’t rely upon colour changes as all three are orange in the console!