From 5103e2caf896c15baad3afe6acf4503dc70c50d8 Mon Sep 17 00:00:00 2001 From: Eli Pousson Date: Fri, 6 Dec 2024 14:41:53 -0500 Subject: [PATCH] Update docs --- man/as_wb.Rd | 13 ++++++++----- man/map_wb.Rd | 16 ++++++++++++---- man/wb_new_workbook.Rd | 3 +++ man/wb_split.Rd | 2 +- 4 files changed, 24 insertions(+), 10 deletions(-) diff --git a/man/as_wb.Rd b/man/as_wb.Rd index 6d66f75..8cd4241 100644 --- a/man/as_wb.Rd +++ b/man/as_wb.Rd @@ -22,8 +22,8 @@ as_wb( } \arguments{ \item{x}{Typically, a data frame or list of data frames. A wbWorkbook is -returned as-is ignoring all other parameters. If \code{type = "any"}, x can also -be an object that is coercible to a data frame.} +returned "as is" ignoring all other parameters. If \code{type = "any"}, x can +also be an object that is coercible to a data frame.} \item{...}{ Arguments passed on to \code{\link[=wb_add_data_ext]{wb_add_data_ext}} @@ -82,11 +82,14 @@ mentioned in error messages as the source of the error. See the object. } \examples{ -as_wb(mtcars) +as_wb(mtcars[1:3,]) -as_wb(list(mtcars, mtcars)) +as_wb(list(mtcars[1:3,], mtcars[4:6,])) } \seealso{ -\code{\link[=write_xlsx_ext]{write_xlsx_ext()}} +\itemize{ +\item \code{\link[=write_xlsx_ext]{write_xlsx_ext()}} +\item \code{\link[=map_wb]{map_wb()}} +} } diff --git a/man/map_wb.Rd b/man/map_wb.Rd index 0ffcef8..6df30ea 100644 --- a/man/map_wb.Rd +++ b/man/map_wb.Rd @@ -4,12 +4,12 @@ \alias{map_wb} \title{Convert an object to a list of workbooks} \usage{ -map_wb(x, ...) +map_wb(x, ..., .progress = FALSE) } \arguments{ \item{x}{Typically, a data frame or list of data frames. A wbWorkbook is -returned as-is ignoring all other parameters. If \code{type = "any"}, x can also -be an object that is coercible to a data frame.} +returned "as is" ignoring all other parameters. If \code{type = "any"}, x can +also be an object that is coercible to a data frame.} \item{...}{ Arguments passed on to \code{\link[=as_wb]{as_wb}} @@ -34,11 +34,19 @@ running function, e.g. \code{caller_env()}. The function will be mentioned in error messages as the source of the error. See the \code{call} argument of \code{\link[rlang:abort]{abort()}} for more information.} }} + +\item{.progress}{Whether to show a progress bar. Use \code{TRUE} to turn on +a basic progress bar, use a string to give it a name, or see +\link[purrr]{progress_bars} for more details.} } \value{ A list of wbWorkbook objects. } \description{ -\code{\link[=map_wb]{map_wb()}} takes a list and returns a list of wbWorkbook objects. +\code{\link[=map_wb]{map_wb()}} takes a list and returns a list of \code{wbWorkbook} objects. +} +\examples{ +map_wb(list(mtcars[1:3,], mtcars[4:6,])) + } \keyword{internal} diff --git a/man/wb_new_workbook.Rd b/man/wb_new_workbook.Rd index ea4184d..e74a7f9 100644 --- a/man/wb_new_workbook.Rd +++ b/man/wb_new_workbook.Rd @@ -80,3 +80,6 @@ wb_new_workbook("Sheet 1") wb_new_workbook(c("Data", "Analysis")) } +\seealso{ +\code{\link[=as_wb]{as_wb()}} +} diff --git a/man/wb_split.Rd b/man/wb_split.Rd index e11406e..8ce91f0 100644 --- a/man/wb_split.Rd +++ b/man/wb_split.Rd @@ -27,7 +27,7 @@ convert each new list of data frames back into a wbWorkbook object. } \examples{ -wb <- as_wb(list(mtcars, mtcars)) +wb <- as_wb(list(mtcars[1:3,], mtcars[4:6,])) wb_split(wb, .key = carb)