diff --git a/R/render.R b/R/render.R index 022300b7..da3b1f2b 100644 --- a/R/render.R +++ b/R/render.R @@ -303,11 +303,11 @@ render.data.frame <- function( -#' `r lifecycle::badge("experimental")` + #' @title Experimental internal function to help render a data.frame, risktable or tableone object as a datatable #' #' @description Render a previously created datatable to html, rtf or latex -#' +#' `r lifecycle::badge("questioning")` #' @param data Input data.frame or tibble to visualize #' @param title Specify the title as a text string to be displayed in the rendered table. #' Default is no title. @@ -316,6 +316,7 @@ render.data.frame <- function( #' @param source_cap String automatically compiled of data source and captions. #' @return A table data structure with possible interactive functionality depending on the choice of the engine. #' @rdname render_datatable +#' @noRd render_datatable <- function(data, title, download_format, source_cap){ UseMethod("render_datatable") } @@ -324,7 +325,7 @@ render_datatable <- function(data, title, download_format, source_cap){ #' @inheritParams render_datatable #' #' @method render_datatable tableone -#' +#' @noRd render_datatable.tableone <- function(data, title, download_format, source_cap) { if (is.null(download_format)) { @@ -359,7 +360,7 @@ render_datatable.tableone <- function(data, title, download_format, source_cap) #' @inheritParams render_datatable #' #' @method render_datatable data.frame -#' +#' @noRd render_datatable.data.frame <- function(data, title, download_format, source_cap) { if (is.null(download_format)) { @@ -384,11 +385,11 @@ render_datatable.data.frame <- function(data, title, download_format, source_cap } -#' `r lifecycle::badge("experimental")` + #' @title Experimental function to render to a gt table. #' #' @description Render a previously created datatable to gt -#' +#' `r lifecycle::badge("questioning")` #' @param data Input data.frame or tibble to visualize #' @param title Specify the title as a text string to be displayed in the rendered table. #' Default is no title. @@ -398,6 +399,7 @@ render_datatable.data.frame <- function(data, title, download_format, source_cap #' alongside the data source and specifications of statistical tests. #' @return A gt object. #' @rdname render_gt +#' @noRd render_gt <- function(data, title, datasource, footnote){ # identify numeric columns for special formatting later numcols <- data %>% dplyr::select_if(is.numeric) %>% names() @@ -414,14 +416,14 @@ render_gt <- function(data, title, datasource, footnote){ return(table_out) } -#' `r lifecycle::badge("experimental")` + #' @title Internal function Get gt object #' @description Internal function Get gt object for tableone - +#' `r lifecycle::badge("questioning")` #' #' @param data input data set #' @param numcols number of columns -#' +#' @noRd #' @return gt object get_gt <- function(data, numcols){ UseMethod("get_gt") @@ -433,7 +435,7 @@ get_gt <- function(data, numcols){ #' @inheritParams get_gt #' #' @method get_gt tableone -#' +#' @noRd get_gt.tableone <- function(data, numcols) { gt <- gt::gt(data, groupname_col = "variable", @@ -458,10 +460,10 @@ get_gt.data.frame <- function(data, numcols) { return(gt) } -#' `r lifecycle::badge("experimental")` + #' @title Internal function to add metadata to a gt object #' @description Internal function to add metadata to a gt object - +#' `r lifecycle::badge("questioning")` #' #' @param gt input gt object #' @param title Specify the title as a text string to be displayed in the rendered table. @@ -470,7 +472,7 @@ get_gt.data.frame <- function(data, numcols) { #' Default is no title. #' @param footnote String specifying additional information to be displayed as a footnote #' alongside the data source and specifications of statistical tests. -#' +#' @noRd #' @return gt object add_metadata_gt <- function(gt, title, datasource, footnote) { @@ -487,12 +489,12 @@ add_metadata_gt <- function(gt, title, datasource, footnote) { } -#' `r lifecycle::badge("experimental")` + #' @title Internal function to check if the input works -#' +#' `r lifecycle::badge("questioning")` #' @param output_format format for output i.e. html #' @param engine engine to render output. -#' +#' @noRd #' @return Warning message check_rendering_input <- function(output_format = NULL, engine = NULL) { diff --git a/man/add_metadata_gt.Rd b/man/add_metadata_gt.Rd deleted file mode 100644 index f40b395c..00000000 --- a/man/add_metadata_gt.Rd +++ /dev/null @@ -1,29 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/render.R -\name{add_metadata_gt} -\alias{add_metadata_gt} -\title{Internal function to add metadata to a gt object} -\usage{ -add_metadata_gt(gt, title, datasource, footnote) -} -\arguments{ -\item{gt}{input gt object} - -\item{title}{Specify the title as a text string to be displayed in the rendered table. -Default is no title.} - -\item{datasource}{String specifying the data source underlying the data set. -Default is no title.} - -\item{footnote}{String specifying additional information to be displayed as a footnote -alongside the data source and specifications of statistical tests.} -} -\value{ -gt object -} -\description{ -Internal function to add metadata to a gt object -} -\details{ -\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} -} diff --git a/man/check_rendering_input.Rd b/man/check_rendering_input.Rd deleted file mode 100644 index b378a6f9..00000000 --- a/man/check_rendering_input.Rd +++ /dev/null @@ -1,19 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/render.R -\name{check_rendering_input} -\alias{check_rendering_input} -\title{Internal function to check if the input works} -\usage{ -check_rendering_input(output_format = NULL, engine = NULL) -} -\arguments{ -\item{output_format}{format for output i.e. html} - -\item{engine}{engine to render output.} -} -\value{ -Warning message -} -\description{ -\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} -} diff --git a/man/get_gt.Rd b/man/get_gt.Rd deleted file mode 100644 index 1208e5b5..00000000 --- a/man/get_gt.Rd +++ /dev/null @@ -1,22 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/render.R -\name{get_gt} -\alias{get_gt} -\title{Internal function Get gt object} -\usage{ -get_gt(data, numcols) -} -\arguments{ -\item{data}{input data set} - -\item{numcols}{number of columns} -} -\value{ -gt object -} -\description{ -Internal function Get gt object for tableone -} -\details{ -\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} -} diff --git a/man/render_datatable.Rd b/man/render_datatable.Rd deleted file mode 100644 index d4d7fb4c..00000000 --- a/man/render_datatable.Rd +++ /dev/null @@ -1,28 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/render.R -\name{render_datatable} -\alias{render_datatable} -\title{Experimental internal function to help render a data.frame, risktable or tableone object as a datatable} -\usage{ -render_datatable(data, title, download_format, source_cap) -} -\arguments{ -\item{data}{Input data.frame or tibble to visualize} - -\item{title}{Specify the title as a text string to be displayed in the rendered table. -Default is no title.} - -\item{download_format}{Options formats generated for downloading the data. -Default is a list "c('copy', 'csv', 'excel')".'} - -\item{source_cap}{String automatically compiled of data source and captions.} -} -\value{ -A table data structure with possible interactive functionality depending on the choice of the engine. -} -\description{ -Render a previously created datatable to html, rtf or latex -} -\details{ -\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} -} diff --git a/man/render_gt.Rd b/man/render_gt.Rd deleted file mode 100644 index 5a22f52a..00000000 --- a/man/render_gt.Rd +++ /dev/null @@ -1,29 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/render.R -\name{render_gt} -\alias{render_gt} -\title{Experimental function to render to a gt table.} -\usage{ -render_gt(data, title, datasource, footnote) -} -\arguments{ -\item{data}{Input data.frame or tibble to visualize} - -\item{title}{Specify the title as a text string to be displayed in the rendered table. -Default is no title.} - -\item{datasource}{String specifying the data source underlying the data set. -Default is no title.} - -\item{footnote}{String specifying additional information to be displayed as a footnote -alongside the data source and specifications of statistical tests.} -} -\value{ -A gt object. -} -\description{ -Render a previously created datatable to gt -} -\details{ -\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} -}