From e73f031101314f4ce8175811568d93a4f4094723 Mon Sep 17 00:00:00 2001 From: Ernest Guevarra Date: Mon, 27 Jan 2025 04:52:10 +0000 Subject: [PATCH] edit examples --- R/08-report.R | 17 +++++++++++++---- man/report_op_docx.Rd | 4 +++- man/report_op_html.Rd | 4 +++- man/report_op_odt.Rd | 4 +++- man/report_op_pdf.Rd | 5 ++++- 5 files changed, 26 insertions(+), 8 deletions(-) diff --git a/R/08-report.R b/R/08-report.R index e11bab3..9789438 100644 --- a/R/08-report.R +++ b/R/08-report.R @@ -783,7 +783,9 @@ report_op_misc <- function(output_format = c("html", "docx", "odt", "pdf")) { #' #' resultsDF <- merge_op(x = classicResults, y = probitResults) #' -#' if (rmarkdown::pandoc_available("1.12.3")) { +#' library(rmarkdown) +#' +#' if (pandoc_available("1.12.3")) { #' report_op_html( #' svy = testSVY, estimates = resultsDF, indicators = "mental", #' filename = paste(tempdir(), "report", sep = "/") @@ -901,7 +903,9 @@ report_op_html <- function(estimates, #' #' resultsDF <- merge_op(x = classicResults, y = probitResults) #' -#' if (rmarkdown::pandoc_version() >= numeric_version("1.12.3")) { +#' library(rmarkdown) +#' +#' if (pandoc_version() >= numeric_version("1.12.3")) { #' report_op_docx( #' svy = testSVY, estimates = resultsDF, indicators = "mental", #' filename = paste(tempdir(), "report", sep = "/") @@ -1017,7 +1021,9 @@ report_op_docx <- function(estimates, #' #' resultsDF <- merge_op(x = classicResults, y = probitResults) #' -#' if (rmarkdown::pandoc_version() >= numeric_version("1.12.3")) { +#' library(rmarkdown) +#' +#' if (pandoc_version() >= numeric_version("1.12.3")) { #' report_op_odt( #' svy = testSVY, estimates = resultsDF, indicators = "mental", #' filename = paste(tempdir(), "report", sep = "/") @@ -1130,8 +1136,11 @@ report_op_odt <- function(estimates, #' #' resultsDF <- merge_op(x = classicResults, y = probitResults) #' +#' library(rmarkdown) +#' library(tinytex) +#' #' \donttest{ -#' if (rmarkdown::pandoc_version() >= numeric_version("1.12.3")) { +#' if (pandoc_version() >= numeric_version("1.12.3")) { #' report_op_pdf( #' svy = testSVY, estimates = resultsDF, indicators = "mental", #' filename = paste(tempdir(), "report", sep = "/") diff --git a/man/report_op_docx.Rd b/man/report_op_docx.Rd index a5a5a4a..7b52c7a 100644 --- a/man/report_op_docx.Rd +++ b/man/report_op_docx.Rd @@ -47,7 +47,9 @@ probitResults <- estimate_probit( resultsDF <- merge_op(x = classicResults, y = probitResults) -if (rmarkdown::pandoc_version() >= numeric_version("1.12.3")) { +library(rmarkdown) + +if (pandoc_version() >= numeric_version("1.12.3")) { report_op_docx( svy = testSVY, estimates = resultsDF, indicators = "mental", filename = paste(tempdir(), "report", sep = "/") diff --git a/man/report_op_html.Rd b/man/report_op_html.Rd index 0103a5c..f91b69e 100644 --- a/man/report_op_html.Rd +++ b/man/report_op_html.Rd @@ -47,7 +47,9 @@ probitResults <- estimate_probit( resultsDF <- merge_op(x = classicResults, y = probitResults) -if (rmarkdown::pandoc_available("1.12.3")) { +library(rmarkdown) + +if (pandoc_available("1.12.3")) { report_op_html( svy = testSVY, estimates = resultsDF, indicators = "mental", filename = paste(tempdir(), "report", sep = "/") diff --git a/man/report_op_odt.Rd b/man/report_op_odt.Rd index 40a5055..79d4e57 100644 --- a/man/report_op_odt.Rd +++ b/man/report_op_odt.Rd @@ -47,7 +47,9 @@ probitResults <- estimate_probit( resultsDF <- merge_op(x = classicResults, y = probitResults) -if (rmarkdown::pandoc_version() >= numeric_version("1.12.3")) { +library(rmarkdown) + +if (pandoc_version() >= numeric_version("1.12.3")) { report_op_odt( svy = testSVY, estimates = resultsDF, indicators = "mental", filename = paste(tempdir(), "report", sep = "/") diff --git a/man/report_op_pdf.Rd b/man/report_op_pdf.Rd index 04d5ba8..bd3877c 100644 --- a/man/report_op_pdf.Rd +++ b/man/report_op_pdf.Rd @@ -46,8 +46,11 @@ probitResults <- estimate_probit( resultsDF <- merge_op(x = classicResults, y = probitResults) +library(rmarkdown) +library(tinytex) + \donttest{ - if (rmarkdown::pandoc_version() >= numeric_version("1.12.3")) { + if (pandoc_version() >= numeric_version("1.12.3")) { report_op_pdf( svy = testSVY, estimates = resultsDF, indicators = "mental", filename = paste(tempdir(), "report", sep = "/")