From 5cd54dd1172a008800def80be3f68d664c0f95fb Mon Sep 17 00:00:00 2001 From: "Fukuda, Hiroaki" Date: Mon, 12 Aug 2024 23:01:09 -0400 Subject: [PATCH] Change output rtf section not to use an additional function. --- R/rtf_static_forestly.R | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/R/rtf_static_forestly.R b/R/rtf_static_forestly.R index a0b2a09..fc34067 100644 --- a/R/rtf_static_forestly.R +++ b/R/rtf_static_forestly.R @@ -197,21 +197,6 @@ rtf_static_forestly <- function( } # Prepare output - rtf_output(outdata, path_outdata, path_outtable, doc_type = "figure") -} - -#' Save outputs for RTF generation -#' -#' @param outdata An `outdata` object. -#' @param path_outdata A character string of file path to save the outdata. -#' @param pat_outtable A character string of file path to save the RTF table. -#' -#' @noRd -rtf_output <- function( - outdata, - path_outdata, - path_outtable, - doc_type = "table") { if (!is.null(path_outdata)) { save(outdata, file = path_outdata) message("The outdata is saved in ", normalizePath(path_outdata)) @@ -219,10 +204,10 @@ rtf_output <- function( if (!is.null(path_outtable)) { outdata$rtf |> - r2rtf::rtf_encode(doc_type = doc_type) |> + r2rtf::rtf_encode(doc_type = "figure") |> r2rtf::write_rtf(file = path_outtable) message("The output is saved in ", normalizePath(path_outtable)) } invisible(outdata) -} +} \ No newline at end of file