Skip to content

Commit

Permalink
Avoid \dontrun{}
Browse files Browse the repository at this point in the history
  • Loading branch information
paulnorthrop committed Apr 27, 2024
1 parent 9d7f352 commit 7581700
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 101 deletions.
13 changes: 3 additions & 10 deletions R/rmd2html.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@
#' the YAML header in the Rmd file are used but \code{output} is ignored.
#'
#' The simplest setup is to have the \code{.Rmd} files in the current
#' working directory, but it is possible to have the \code{.Rmd} files in
#' different directories.
#' working directory, in which case `rmd2html()` will create HTML documents
#' from all these Rmd files, the \code{.Rmd} files may be in different
#' directories.
#'
#' The \code{\link[rmarkdown]{render}} function, with the argument
#' \code{output_file =} \code{\link[rmarkdown]{html_document}}
Expand Down Expand Up @@ -87,14 +88,6 @@
#' ex_file <- sub(".Rmd", "", ex_file)
#' rmd2html(ex_file)
#' }
#'
#' \dontrun{
#' # Create HTML documents from your files file1.Rmd and file2.Rmd
#' rmd2html(c("file1", "file2"))
#'
#' # Create HTML documents from all Rmd files in your working directory
#' rmd2html()
#' }
#' @export
rmd2html <- function(x, zip = if (length(x) == 1 & !add) FALSE else TRUE,
pdf = FALSE, pdf_args = list(), zip_pdf = zip,
Expand Down
15 changes: 4 additions & 11 deletions R/rmd2ioslides.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@
#' @details Information such as \code{title}, \code{author}, \code{lang} etc in
#' the YAML header in the Rmd file are used but \code{output} is ignored.
#'
#' The simplest setup is to have the \code{.Rmd} files in the current
#' working directory, but it is possible to have the \code{.Rmd} files in
#' different directories.
#' The simplest setup is to have the \code{.Rmd} files in the current
#' working directory, in which case `rmd2ioslides()` will create ioslides
#' presentations from all these Rmd files, but the \code{.Rmd} files may be
#' in different directories.
#'
#' The \code{\link[rmarkdown]{render}} function, with the argument
#' \code{output_file =} \code{\link[rmarkdown]{ioslides_presentation}}
Expand Down Expand Up @@ -135,14 +136,6 @@
#' ex_file <- sub(".Rmd", "", ex_file)
#' rmd2ioslides(ex_file)
#' }
#'
#' \dontrun{
#' # Create ioslides presentations from your files file1.Rmd and file2.Rmd
#' rmd2ioslides(c("file1", "file2"), inc_word = TRUE)
#'
#' # Create ioslides presentations from all Rmd files in your working directory
#' rmd2ioslides()
#' }
#' @export
rmd2ioslides <- function(x, zip = if (length(x) == 1 & !add) FALSE else TRUE,
pdf = FALSE, zip_pdf = zip, pdf_args = list(),
Expand Down
5 changes: 0 additions & 5 deletions R/rmd2many.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@
#' ex_file <- sub(".Rmd", "", ex_file)
#' rmd2many(ex_file, params = list(hide = TRUE), pdf = FALSE, zip = TRUE)
#' }
#'
#' \dontrun{
#' # Create multiple documents files from your files file1.Rmd and file2.Rmd
#' rmd2many(c("file1", "file2"))
#' }
#' @export
rmd2many <- function(x, outputs = c("ioslides", "word"), slide_level = 1,
css = "black", add18 = TRUE, pdf = TRUE,
Expand Down
13 changes: 3 additions & 10 deletions R/rmd2slidy.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@
#' the YAML header in the Rmd file are used but \code{output} is ignored.
#'
#' The simplest setup is to have the \code{.Rmd} files in the current
#' working directory, but it is possible to have the \code{.Rmd} files in
#' different directories.
#' working directory, in which case `rmd2slidy()` will create slidy
#' presentations from all these Rmd files, but the \code{.Rmd} files may be
#' in different directories.
#'
#' The \code{\link[rmarkdown]{render}} function, with the argument
#' \code{output_file =} \code{\link[rmarkdown]{slidy_presentation}}
Expand Down Expand Up @@ -99,14 +100,6 @@
#' ex_file <- sub(".Rmd", "", ex_file)
#' rmd2slidy(ex_file)
#' }
#'
#' \dontrun{
#' # Create slidy presentations from your files file1.Rmd and file2.Rmd
#' rmd2slidy(c("file1", "file2"), inc_word = TRUE)
#'
#' # Create slidy presentations from all Rmd files in your working directory
#' rmd2slidy()
#' }
#' @export
rmd2slidy <- function(x, zip = if (length(x) == 1 & !add) FALSE else TRUE,
pdf = FALSE, zip_pdf = zip, pdf_args = list(),
Expand Down
20 changes: 6 additions & 14 deletions R/rmd2word.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@
#' @details Information such as \code{title}, \code{author}, \code{lang} etc in
#' the YAML header in the Rmd file are used but \code{output} is ignored.
#'
#' The simplest setup is to have the \code{.Rmd} files and the Word
#' template (if used) and \code{OfficeToPDF.exe} in the current working
#' directory.
#' The simplest setup is to have the \code{.Rmd} files in the current
#' working directory, in which case `rmd2word()` will create Word documents
#' from all these Rmd files, but the \code{.Rmd} files may be in different
#' directories.
#'
#' It is possible to have the \code{.Rmd} files in different
#' directories, but any non-\code{"default"} values in \code{doc} must be
Expand Down Expand Up @@ -148,22 +149,13 @@
#' got_pandoc <- rmarkdown::pandoc_available("1.14")
#' got_all <- got_hux && got_flex && got_pandoc
#' # This example needs packages huxtable and flextable
#' # If pdf = TRUE then OfficeToPDF must first be installed using the
#' # function accessr::install_otp
#' if (got_all) {
#' ex_file <- system.file(package = "accessr", "examples", "example.Rmd")
#' ex_file <- sub(".Rmd", "", ex_file)
#' rmd2word(ex_file, pdf = FALSE)
#' }
#'
#' \dontrun{
#' # Install OfficeToPDF to create PDF files
#' install_otp()
#'
#' # Create PDF documents files from your files file1.Rmd and file2.Rmd
#' rmd2pdf(c("file1", "file2"))
#'
#' # Create Word and PDF files from all Rmd files in your working directory
#' rmd2word(inc_word = TRUE)
#' }
#' @export
rmd2word <- function(x, doc = "accessr",
pdf = isTRUE(.Platform$OS.type == "windows"), dir,
Expand Down
3 changes: 1 addition & 2 deletions man/install_otp.Rd

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

13 changes: 3 additions & 10 deletions man/rmd2html.Rd

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

13 changes: 3 additions & 10 deletions man/rmd2ioslides.Rd

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

5 changes: 0 additions & 5 deletions man/rmd2many.Rd

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

13 changes: 3 additions & 10 deletions man/rmd2slidy.Rd

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

20 changes: 6 additions & 14 deletions man/rmd2word.Rd

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

0 comments on commit 7581700

Please sign in to comment.