diff --git a/Connect Project R Markdown.Rmd b/Connect Project R Markdown.Rmd index 6d14cf2..7750add 100644 --- a/Connect Project R Markdown.Rmd +++ b/Connect Project R Markdown.Rmd @@ -5,6 +5,13 @@ output: html_document ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) +# Load RColorBrewer +# install.packages("RColorBrewer") +library(RColorBrewer) + +# Define colour palettes for plots below +3clr <- brewer.pal(3, "RdYlBu") # Using RdYlBu range to generate 3 colour palette: https://colorbrewer2.org/#type=diverging&scheme=RdYlBu&n=5 + ``` Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot. @@ -34,7 +41,7 @@ Q3_freq ``` ```{r Q25 bar/pie} -pie(Q25_frequencies, labels = c("Maybe", "No", "Yes")) +pie(Q25_frequencies, labels = c("Maybe", "No", "Yes"), col = 3clr) ```