Skip to content

Commit

Permalink
change examplesIf to dontrun
Browse files Browse the repository at this point in the history
  • Loading branch information
noellepablo committed Sep 6, 2024
1 parent 1d388bf commit dd9b575
Show file tree
Hide file tree
Showing 17 changed files with 59 additions and 38 deletions.
4 changes: 2 additions & 2 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 0.1.0
Date: 2024-08-21 21:42:06 UTC
SHA: 511abcf63ad8520b01e2a4f408eaad8df1918572
Date: 2024-08-23 19:56:50 UTC
SHA: 1d388bf328cb6c3d6f396aac4d64ede4d4f6eb34
30 changes: 22 additions & 8 deletions R/render.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
#' @return A modified `word_document2` with the standard topic guide formatting.
#' @export
#'
#' @examplesIf interactive()
#' output: ratlas::topicguide_docx
#' @examples
#' \dontrun{
#' output: ratlas::topicguide_docx
#' }
topicguide_docx <- function(...) {
template <- find_resource("topicguide_docx", "template.docx")
base <- bookdown::word_document2(reference_docx = template, ...)
Expand Down Expand Up @@ -43,8 +45,10 @@ topicguide_docx <- function(...) {
#' @return A modified `word_document2` with the standard topic guide formatting.
#' @export
#'
#' @examplesIf interactive()
#' @examples
#' \dontrun{
#' output: ratlas::topicguide_rdocx
#' }
topicguide_rdocx <- function(...) {
template <- find_resource("topicguide_rdocx", "template.docx")
base <- officedown::rdocx_document(base_format = "bookdown::word_document2",
Expand Down Expand Up @@ -106,8 +110,10 @@ topicguide_rdocx <- function(...) {
#' @return A modified `pdf_document2` with the standard tech report formatting.
#' @export
#'
#' @examplesIf interactive()
#' @examples
#' \dontrun{
#' output: ratlas::topicguide_pdf
#' }
topicguide_pdf <- function(...) {
topic_guide_template <- find_resource("topicguide_pdf", "template.tex")
base <- bookdown::pdf_document2(template = topic_guide_template,
Expand Down Expand Up @@ -150,8 +156,10 @@ topicguide_pdf <- function(...) {
#' @return A modified `pdf_document2` with the standard tech report formatting.
#' @export
#'
#' @examplesIf interactive()
#' @examples
#' \dontrun{
#' output: ratlas::measr_pdf
#' }
measr_pdf <- function(...) {
report_template <- find_resource("measr_pdf", "template.tex")
base <- bookdown::pdf_document2(template = report_template,
Expand Down Expand Up @@ -196,8 +204,10 @@ measr_pdf <- function(...) {
#' @return A modified `pdf_document2` with the standard tech report formatting.
#' @export
#'
#' @examplesIf interactive()
#' @examples
#' \dontrun{
#' output: ratlas::techreport_pdf
#' }
techreport_pdf <- function(apa6 = FALSE, ...) {
template_name <- ifelse(apa6, "apa6-template.tex", "template.tex")
tech_report_template <- find_resource("techreport", template_name)
Expand Down Expand Up @@ -245,8 +255,10 @@ techreport_pdf <- function(apa6 = FALSE, ...) {
#' @return A modified `gitbook` with the standard tech report formatting.
#' @export
#'
#' @examplesIf interactive()
#' @examples
#' \dontrun{
#' output: ratlas::techreport_gitbook
#' }
techreport_gitbook <- function(...) {
base <-
bookdown::gitbook(css = "assets/style.css",
Expand Down Expand Up @@ -306,8 +318,10 @@ techreport_gitbook <- function(...) {
#' @return A modified `mood_reader` with ATLAS branding applied.
#' @export
#'
#' @examplesIf interactive()
#' @examples
#' \dontrun{
#' output: ratlas::slides_html
#' }
slides_html <- function(...) {
default_nature <- list(ratio = "16:9",
highlightStyle = "github",
Expand Down
4 changes: 3 additions & 1 deletion R/save-plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
#' `v` for vertical.
#' @param embed_fonts Logical. Use Ghostscript to embed fonts in a PDF graphic?
#' @param ... Additional arguments passed to [ggplot2::ggsave()]
#' @examplesIf interactive()
#' @examples
#' \dontrun{
#' p <- ggplot(mtcars, aes(mpg, wt)) +
#' geom_point()
#'
#' ggsave2(p, "/mtcars.pdf", path = tempdir())
#' ggsave2(p, "/mtcars.png", path = tempdir())
#' }
#' @return None. Called for side effects.
#' @export
ggsave2 <- function(plot = ggplot2::last_plot(), filename, device = NULL,
Expand Down
4 changes: 3 additions & 1 deletion R/set-theme.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
#' "inferno", "plasma", "viridis" (default), or "cividis", or "ggplot2".
#' @param ... Additional arguments to pass to theme functions.
#'
#' @examplesIf interactive()
#' @examples
#' \dontrun{
#' set_theme("Arial Narrow")
#' }
#' @return None. Called for side effects.
#' @export
set_theme <- function(font = "Arial Narrow",
Expand Down
4 changes: 3 additions & 1 deletion R/theme-atlas.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
#' @param ticks ticks if `TRUE` add ticks
#' @return A theme for use in plots created with [ggplot2::ggplot()].
#' @export
#' @examplesIf interactive()
#' @examples
#' \dontrun{
#' library(ggplot2)
#' library(dplyr)
#'
Expand All @@ -51,6 +52,7 @@
#' caption = "Brought to you by the letter 'g'") +
#' theme_atlas(grid = "Y") +
#' theme(axis.text.y = element_blank())
#' }
theme_atlas <- function(base_family = "Arial Narrow", base_size = 11.5,
plot_title_family = base_family,
plot_title_size = 18,
Expand Down
5 changes: 3 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
#' @param sep a separator for each line.
#'
#' @return a string
#' @examplesIf interactive()
#' @examples
#' \dontrun{
#' inc("front-matter/preface.Rmd")
#'
#' }
#' @export
inc <- function(input, sep = "\n\n ") {
paste(readLines(input), collapse = sep)
Expand Down
4 changes: 2 additions & 2 deletions man/ggsave2.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/inc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/measr_pdf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/set_theme.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/slides_html.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/techreport_gitbook.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/techreport_pdf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/theme_atlas.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/topicguide_docx.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/topicguide_pdf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/topicguide_rdocx.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dd9b575

Please sign in to comment.