From ee244b498a3daeb94f611033bb7521c6e046fb9d Mon Sep 17 00:00:00 2001
From: einartornes <45436606+einartornes@users.noreply.github.com>
Date: Tue, 21 Feb 2023 17:21:14 +0100
Subject: [PATCH] New .Rd files in man-folder
---
DESCRIPTION | 7 +++++--
R/style_functions.R | 6 ++----
README.Rmd | 10 ++++++++--
man/theme_norad.Rd | 3 ---
4 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/DESCRIPTION b/DESCRIPTION
index 6f97f99..b497d43 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -8,7 +8,10 @@ Description: Provides Norads colour palette and theme for creating ggplot2 graph
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
-RoxygenNote: 7.2.1
+RoxygenNote: 7.2.3
Imports:
+ curl,
ggplot2,
- grDevices
+ grDevices,
+ jsonlite,
+ sysfonts
diff --git a/R/style_functions.R b/R/style_functions.R
index 8dc0a9a..631b453 100644
--- a/R/style_functions.R
+++ b/R/style_functions.R
@@ -1,7 +1,6 @@
#' Function for using Norad's theme in ggplot2 graphics
#'
-#'
-
+#'@name theme_norad
sysfonts::font_add_google(name = "Arimo")
sysfonts::font_add_google(name = "EB Garamond")
@@ -64,8 +63,7 @@ theme_norad <- function() {
#' ggplot(mtcars, aes(factor(cyl), mpg)) +
#' geom_bar(aes(fill = factor(cyl)), stat = "identity") +
#' theme_norad()
-
-#' @examples
+#'
#' ggplot(mtcars, aes(factor(cyl), mpg)) +
#' geom_bar(aes(fill = factor(cyl)), stat = "identity") +
#' theme_norad()
diff --git a/README.Rmd b/README.Rmd
index 37eea23..bd58b40 100644
--- a/README.Rmd
+++ b/README.Rmd
@@ -12,12 +12,18 @@ knitr::opts_chunk$set(
)
```
-# noradplot
+# noradplot
## Overview
+
Norads colour palette and plot style for creating ggplot2 graphics.
+- Use `theme_norad()` to add norad style
+
+- Use `scale_*` functions to add norad colour palette
+
## Examples
+
```{r example}
library(ggplot2)
@@ -29,5 +35,5 @@ ggplot(mpg, aes(displ, hwy, color = class)) +
```
## Credits
-Based on Simon Jackson's blog post: Creating corporate colour palettes for ggplot2, BBC BBC Visual and Data Journalism cookbook for R graphics: https://bbc.github.io/rcookbook/ and Meghan Halls blog post Creating Custom colour palettes for ggplot2: https://meghan.rbind.io/blog/2022-10-11-creating-custom-color-palettes-with-ggplot2/
+Based on Simon Jackson's blog post: Creating corporate colour palettes for ggplot2, BBC BBC Visual and Data Journalism cookbook for R graphics: and Meghan Halls blog post Creating Custom colour palettes for ggplot2:
diff --git a/man/theme_norad.Rd b/man/theme_norad.Rd
index 03dff05..f436bb1 100644
--- a/man/theme_norad.Rd
+++ b/man/theme_norad.Rd
@@ -3,9 +3,6 @@
\name{theme_norad}
\alias{theme_norad}
\title{Function for using Norad's theme in ggplot2 graphics}
-\usage{
-theme_norad()
-}
\description{
Function for using Norad's theme in ggplot2 graphics
}