11.1 Visualisation Setup

20200608 Packages used in this chapter include GGally (Schloerke et al. 2021), RColorBrewer (Neuwirth 2014), colorRamps (Keitt 2012), dplyr (Wickham, François, et al. 2021), epitools (Aragon 2020), geomtextpath (Cameron and van den Brand 2022), ggplot2 (Wickham, Chang, et al. 2021), lubridate (Spinu, Grolemund, and Wickham 2021), patchwork (Pedersen 2020), randomForest (Breiman et al. 2018), scales (Wickham and Seidel 2020), stringr (Wickham 2019b), tidyr (Wickham 2021), magrittr (Bache and Wickham 2020), and rattle (G. Williams 2021).

Packages are loaded into the currently running R session from your local library directories on disk. Missing packages can be installed using utils::install.packages() within R. On Ubuntu, for example, R packages can also be installed using $ wajig install r-cran-<pkgname>.

# Load required packages from local library into the R session.

library(GGally)       # Pairs plots.
library(RColorBrewer) # Brew various colour ranges.
library(colorRamps)   # Generate colour ranges: blue2green2red().
library(dplyr)        # glimpse().
library(epitools)     # Colour selection: colors.plot().
library(geomtextpath) # Flexible text placement.
library(ggplot2)      # Visualise data.
library(lubridate)    # Tidy dates and time.
library(patchwork)    # Plot themes, alignment, arrangement.
library(scales)       # commas(), percent().
library(stringr)      # str_replace_all().
library(tidyr)        # Tidy the dataset: pivot_longer().
library(rattle)       # Dataset weatherAUS.


Aragon, Tomas J. 2020. Epitools: Epidemiology Tools. https://CRAN.R-project.org/package=epitools.
Bache, Stefan Milton, and Hadley Wickham. 2020. Magrittr: A Forward-Pipe Operator for r. https://CRAN.R-project.org/package=magrittr.
Breiman, Leo, Adele Cutler, Andy Liaw, and Matthew Wiener. 2018. randomForest: Breiman and Cutler’s Random Forests for Classification and Regression. https://www.stat.berkeley.edu/~breiman/RandomForests/.
Cameron, Allan, and Teun van den Brand. 2022. Geomtextpath: Use Curved Text in Ggplot2. https://allancameron.github.io/geomtextpath.
Keitt, Tim. 2012. colorRamps: Builds Color Tables. https://CRAN.R-project.org/package=colorRamps.
Neuwirth, Erich. 2014. RColorBrewer: ColorBrewer Palettes. https://CRAN.R-project.org/package=RColorBrewer.
Pedersen, Thomas Lin. 2020. Patchwork: The Composer of Plots. https://CRAN.R-project.org/package=patchwork.
Schloerke, Barret, Di Cook, Joseph Larmarange, Francois Briatte, Moritz Marbach, Edwin Thoen, Amos Elberg, and Jason Crowley. 2021. GGally: Extension to Ggplot2. https://CRAN.R-project.org/package=GGally.
Spinu, Vitalie, Garrett Grolemund, and Hadley Wickham. 2021. Lubridate: Make Dealing with Dates a Little Easier. https://CRAN.R-project.org/package=lubridate.
———. 2019b. Stringr: Simple, Consistent Wrappers for Common String Operations. https://CRAN.R-project.org/package=stringr.
———. 2021. Tidyr: Tidy Messy Data. https://CRAN.R-project.org/package=tidyr.
Wickham, Hadley, Winston Chang, Lionel Henry, Thomas Lin Pedersen, Kohske Takahashi, Claus Wilke, Kara Woo, Hiroaki Yutani, and Dewey Dunnington. 2021. Ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics. https://CRAN.R-project.org/package=ggplot2.
Wickham, Hadley, Romain François, Lionel Henry, and Kirill Müller. 2021. Dplyr: A Grammar of Data Manipulation. https://CRAN.R-project.org/package=dplyr.
Wickham, Hadley, and Dana Seidel. 2020. Scales: Scale Functions for Visualization. https://CRAN.R-project.org/package=scales.
Williams, Graham. 2021. Rattle: Graphical User Interface for Data Science in r. https://rattle.togaware.com/.

Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0