From 0e7c4eb5460f3fd520b5e04882ca6f943375e80e Mon Sep 17 00:00:00 2001 From: Joshua Rosenberg Date: Mon, 29 Jun 2020 18:47:55 -0400 Subject: [PATCH 1/2] add functions to install bookdown dependencies --- NAMESPACE | 2 ++ R/data.R | 13 +++++++++++++ R/install_dataedu.R | 18 ++++++++++++++++++ man/dataedu_bookdown_dependencies.Rd | 16 ++++++++++++++++ man/install_bookdown_dependencies.Rd | 13 +++++++++++++ 5 files changed, 62 insertions(+) create mode 100644 man/dataedu_bookdown_dependencies.Rd create mode 100644 man/install_bookdown_dependencies.Rd diff --git a/NAMESPACE b/NAMESPACE index 6eda105..bb8f784 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,7 +1,9 @@ # Generated by roxygen2: do not edit by hand +export(dataedu_bookdown_dependencies) export(dataedu_colors) export(dataedu_packages) +export(install_bookdown_dependencies) export(install_dataedu) export(load.cabin) export(scale_color_dataedu) diff --git a/R/data.R b/R/data.R index 84552ce..12e1497 100644 --- a/R/data.R +++ b/R/data.R @@ -347,3 +347,16 @@ dataedu_packages <- "tidyverse", "tidytext" ) + +#' All packages used to render the Data Science in Education Using R book (via {bookdown}) +#' +#' @name dataedu_bookdown_dependencies +#' @format A character vector +#' @export dataedu_bookdown_dependencies + +dataedu_bookdown_dependencies <- + c( + "RefManageR", + "png", + "bookdown" + ) diff --git a/R/install_dataedu.R b/R/install_dataedu.R index d6bc84e..370c8cc 100644 --- a/R/install_dataedu.R +++ b/R/install_dataedu.R @@ -14,3 +14,21 @@ install_dataedu <- function() { Sys.sleep(2) install.packages(dataedu_packages) } + +#' Mass installation of DSIEUR bookdown packages needed to render the book +#' +#' @description +#' `install_bookdown_dependencies()` installs the packages required as +#' dependencies used to render the bookdown book +#' (at https://github.com/data-edu/data-science-in-education) +#' +#' @usage +#' install_bookdown_dependencies() +#' +#' @rdname install_bookdown_dependencies +#' @export + +install_bookdown_dependencies <- function() { + Sys.sleep(2) + install.packages(dataedu_bookdown_dependencies) +} diff --git a/man/dataedu_bookdown_dependencies.Rd b/man/dataedu_bookdown_dependencies.Rd new file mode 100644 index 0000000..dced096 --- /dev/null +++ b/man/dataedu_bookdown_dependencies.Rd @@ -0,0 +1,16 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{dataedu_bookdown_dependencies} +\alias{dataedu_bookdown_dependencies} +\title{All packages used to render the Data Science in Education Using R book (via {bookdown})} +\format{ +A character vector +} +\usage{ +dataedu_bookdown_dependencies +} +\description{ +All packages used to render the Data Science in Education Using R book (via {bookdown}) +} +\keyword{datasets} diff --git a/man/install_bookdown_dependencies.Rd b/man/install_bookdown_dependencies.Rd new file mode 100644 index 0000000..15ea40a --- /dev/null +++ b/man/install_bookdown_dependencies.Rd @@ -0,0 +1,13 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/install_dataedu.R +\name{install_bookdown_dependencies} +\alias{install_bookdown_dependencies} +\title{Mass installation of DSIEUR bookdown packages needed to render the book} +\usage{ +install_bookdown_dependencies() +} +\description{ +\code{install_bookdown_dependencies()} installs the packages required as +dependencies used to render the bookdown book +(at https://github.com/data-edu/data-science-in-education) +} From ba20b064d30f601ae3ca5d8507e71a30e33fd981 Mon Sep 17 00:00:00 2001 From: Joshua Rosenberg Date: Mon, 29 Jun 2020 19:16:39 -0400 Subject: [PATCH 2/2] add extrafont --- R/data.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/data.R b/R/data.R index 12e1497..c9db5b3 100644 --- a/R/data.R +++ b/R/data.R @@ -358,5 +358,6 @@ dataedu_bookdown_dependencies <- c( "RefManageR", "png", - "bookdown" + "bookdown", + "extrafont" )