From 758d6015048de9047eec7ea2c802739d95bb8ea2 Mon Sep 17 00:00:00 2001 From: Jeremy Kidwell Date: Wed, 27 Oct 2021 13:22:49 +0100 Subject: [PATCH] added RColourBrewer to first pie chart as an example, fixed var names --- Connect Project R Markdown.Rmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Connect Project R Markdown.Rmd b/Connect Project R Markdown.Rmd index 7750add..762d0c5 100644 --- a/Connect Project R Markdown.Rmd +++ b/Connect Project R Markdown.Rmd @@ -10,7 +10,7 @@ knitr::opts_chunk$set(echo = TRUE) 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 +coul3 <- brewer.pal(3, "RdYlBu") # Using RdYlBu range to generate 3 colour palette: https://colorbrewer2.org/#type=diverging&scheme=RdYlBu&n=5 ``` @@ -41,7 +41,7 @@ Q3_freq ``` ```{r Q25 bar/pie} -pie(Q25_frequencies, labels = c("Maybe", "No", "Yes"), col = 3clr) +pie(Q25_frequencies, labels = c("Maybe", "No", "Yes"), col = coul3) ```