From a4265b73fbcd0e9d4954e6724dd2312f9433e7e9 Mon Sep 17 00:00:00 2001 From: Emily de la Rua Date: Thu, 4 Apr 2024 14:18:34 -0400 Subject: [PATCH] Inherit roxygen updates from `formatters` --- man/analyze.Rd | 3 +- man/analyze_colvars.Rd | 3 +- man/formatters_methods.Rd | 53 ++++++++++------------ man/gen_args.Rd | 3 +- man/int_methods.Rd | 3 +- man/lyt_args.Rd | 3 +- man/make_col_df.Rd | 8 ++-- man/paginate.Rd | 84 ++++++++++++++++------------------- man/rowclasses.Rd | 3 +- man/split_rows_by.Rd | 3 +- man/split_rows_by_multivar.Rd | 3 +- man/summarize_row_groups.Rd | 3 +- man/tabclasses.Rd | 3 +- man/table_shell.Rd | 29 +++++------- man/tostring.Rd | 51 +++++++++------------ man/tt_to_flextable.Rd | 15 +++---- man/varcuts.Rd | 3 +- 17 files changed, 117 insertions(+), 156 deletions(-) diff --git a/man/analyze.Rd b/man/analyze.Rd index f631a2b2d..10f6bf00a 100644 --- a/man/analyze.Rd +++ b/man/analyze.Rd @@ -39,8 +39,7 @@ analysis. Defaults to \code{var}.} declared via strings (\code{"xx.x"}) or function. In cases such as \code{analyze} calls, they can character vectors or lists of functions.} -\item{na_str}{character(1). String that should be displayed when the value of \code{x} is missing. -Defaults to \code{"NA"}.} +\item{na_str}{(\code{string})\cr string to display when the value of \code{x} is missing. Defaults to \code{"NA"}.} \item{nested}{boolean. Should this layout instruction be applied within the existing layout structure \emph{if possible} (\code{TRUE}, the default) or as a diff --git a/man/analyze_colvars.Rd b/man/analyze_colvars.Rd index bb5025383..24a940b94 100644 --- a/man/analyze_colvars.Rd +++ b/man/analyze_colvars.Rd @@ -28,8 +28,7 @@ parameters as \link{analyze} like \code{afun} and \code{format}. For further inf declared via strings (\code{"xx.x"}) or function. In cases such as \code{analyze} calls, they can character vectors or lists of functions.} -\item{na_str}{character(1). String that should be displayed when the value of \code{x} is missing. -Defaults to \code{"NA"}.} +\item{na_str}{(\code{string})\cr string to display when the value of \code{x} is missing. Defaults to \code{"NA"}.} \item{nested}{boolean. Should this layout instruction be applied within the existing layout structure \emph{if possible} (\code{TRUE}, the default) or as a diff --git a/man/formatters_methods.Rd b/man/formatters_methods.Rd index 41e60e1cc..3240a439a 100644 --- a/man/formatters_methods.Rd +++ b/man/formatters_methods.Rd @@ -181,32 +181,32 @@ \item{colwidths}{numeric vector. Column widths for use with vertical pagination.} -\item{max_width}{numeric(1). Width strings should be wrapped to -when determining how many lines they require.} +\item{max_width}{(\code{numeric(1)})\cr width that strings should be wrapped to when +determining how many lines they require.} \item{tt}{\code{TableTree} (or related class). A \code{TableTree} object representing a populated table.} -\item{visible_only}{logical(1). Should only visible aspects of the table structure be reflected in this summary. -Defaults to \code{TRUE}. May not be supported by all methods.} +\item{visible_only}{(\code{flag})\cr should only visible aspects of the table structure be reflected +in this summary. Defaults to \code{TRUE}. May not be supported by all methods.} -\item{rownum}{numeric(1). Internal detail do not set manually.} +\item{rownum}{(\code{numeric(1)})\cr internal detail, do not set manually.} -\item{indent}{integer(1). Internal detail do not set manually.} +\item{indent}{(\code{integer(1)})\cr internal detail, do not set manually.} \item{path}{character. A vector path for a position within the structure of a \code{tabletree}. Each element represents a subsequent choice amongst the children of the previous choice.} -\item{incontent}{logical(1). Internal detail do not set manually.} +\item{incontent}{(\code{flag})\cr internal detail, do not set manually.} -\item{repr_ext}{integer(1). Internal detail do not set manually.} +\item{repr_ext}{(\code{integer(1)})\cr internal detail, do not set manually.} -\item{repr_inds}{integer. Internal detail do not set manually.} +\item{repr_inds}{(\code{integer})\cr internal detail, do not set manually.} -\item{sibpos}{integer(1). Internal detail do not set manually.} +\item{sibpos}{(\code{integer(1)})\cr internal detail, do not set manually.} -\item{nsibs}{integer(1). Internal detail do not set manually.} +\item{nsibs}{(\code{integer(1)})\cr internal detail, do not set manually.} } \value{ for getters, the current value of the component being accessed @@ -216,25 +216,20 @@ on \code{obj}, for setters, a modified copy of \code{obj} with the new value. See the \code{formatters} documentation for descriptions of these generics. } \details{ -When \code{visible_only} is \code{TRUE} (the default), -methods should return a data.frame with exactly one row per -visible row in the table-like object. This is useful when -reasoning about how a table will print, but does not reflect -the full pathing space of the structure (though the paths which -are given will all work as is). - -If supported, when \code{visible_only} is \code{FALSE}, every -structural element of the table (in row-space) will be reflected in -the returned data.frame, meaning the full pathing-space will be -represented but some rows in the layout summary will not represent -printed rows in the table as it is displayed. - -Most arguments beyond \code{tt} and \code{visible_only} are present so that -\code{make_row_df} methods can call \code{make_row_df} recursively and retain information, -and should not be set during a top-level call +When \code{visible_only} is \code{TRUE} (the default), methods should return a \code{data.frame} with exactly one +row per visible row in the table-like object. This is useful when reasoning about how a table will +print, but does not reflect the full pathing space of the structure (though the paths which are given +will all work as is). + +If supported, when \code{visible_only} is \code{FALSE}, every structural element of the table (in row-space) +will be reflected in the returned \code{data.frame}, meaning the full pathing-space will be represented +but some rows in the layout summary will not represent printed rows in the table as it is displayed. + +Most arguments beyond \code{tt} and \code{visible_only} are present so that \code{make_row_df} methods can call +\code{make_row_df} recursively and retain information, and should not be set during a top-level call. } \note{ -the technically present root tree node is excluded from the summary returned by -both \code{make_row_df} and \code{make_col_df} (see \code{rtables::make_col_df}), as it is simply the +The technically present root tree node is excluded from the summary returned by +both \code{make_row_df} and \code{make_col_df} (see \code{\link[rtables:make_col_df]{rtables::make_col_df()}}), as it is simply the row/column structure of \code{tt} and thus not useful for pathing or pagination. } diff --git a/man/gen_args.Rd b/man/gen_args.Rd index a965d0de3..42851fafa 100644 --- a/man/gen_args.Rd +++ b/man/gen_args.Rd @@ -99,8 +99,7 @@ Defaults to 2} divider after each group defined by this split instruction, or \code{NA_character_} (the default) for no section divider.} -\item{na_str}{character(1). String that should be displayed when the value of \code{x} is missing. -Defaults to \code{"NA"}.} +\item{na_str}{(\code{string})\cr string to display when the value of \code{x} is missing. Defaults to \code{"NA"}.} \item{inset}{numeric(1). Number of spaces to inset the table header, table body, referential footnotes, and main_footer, as compared to alignment diff --git a/man/int_methods.Rd b/man/int_methods.Rd index 1920d9208..a46117757 100644 --- a/man/int_methods.Rd +++ b/man/int_methods.Rd @@ -1172,8 +1172,7 @@ analyses, which is not allowed.} declared via strings (\code{"xx.x"}) or function. In cases such as \code{analyze} calls, they can character vectors or lists of functions.} -\item{na_str}{character(1). String that should be displayed when the value of \code{x} is missing. -Defaults to \code{"NA"}.} +\item{na_str}{(\code{string})\cr string to display when the value of \code{x} is missing. Defaults to \code{"NA"}.} \item{override}{logical(1).} diff --git a/man/lyt_args.Rd b/man/lyt_args.Rd index a74556b68..b2c375474 100644 --- a/man/lyt_args.Rd +++ b/man/lyt_args.Rd @@ -199,8 +199,7 @@ formatted if this cell's value(s) are all NA.} divider after each group defined by this split instruction, or \code{NA_character_} (the default) for no section divider.} -\item{na_str}{character(1). String that should be displayed when the value of \code{x} is missing. -Defaults to \code{"NA"}.} +\item{na_str}{(\code{string})\cr string to display when the value of \code{x} is missing. Defaults to \code{"NA"}.} } \value{ NULL (this is an argument template dummy function) diff --git a/man/make_col_df.Rd b/man/make_col_df.Rd index c6d0b0eef..5ba28574f 100644 --- a/man/make_col_df.Rd +++ b/man/make_col_df.Rd @@ -7,12 +7,12 @@ make_col_df(tt, colwidths = NULL, visible_only = TRUE) } \arguments{ -\item{tt}{ANY. Object representing the table-like object to be summarized.} +\item{tt}{(\code{ANY})\cr object representing the table-like object to be summarized.} -\item{colwidths}{numeric. Internal detail do not set manually.} +\item{colwidths}{(\code{numeric})\cr internal detail, do not set manually.} -\item{visible_only}{logical(1). Should only visible aspects of the table structure be reflected in this summary. -Defaults to \code{TRUE}. May not be supported by all methods.} +\item{visible_only}{(\code{flag})\cr should only visible aspects of the table structure be reflected +in this summary. Defaults to \code{TRUE}. May not be supported by all methods.} } \description{ Generate a structural summary of the columns of an diff --git a/man/paginate.Rd b/man/paginate.Rd index 119f50ade..65bc92f0b 100644 --- a/man/paginate.Rd +++ b/man/paginate.Rd @@ -49,48 +49,42 @@ considerations. Defaults to none.} \item{colwidths}{numeric vector. Column widths for use with vertical pagination.} -\item{max_width}{integer(1), character(1) or \code{NULL}. Width that title -and footer (including footnotes) materials should be -word-wrapped to. If \code{NULL}, it is set to the current print width -of the session (\code{getOption("width")}). If set to \code{"auto"}, -the width of the table (plus any table inset) is used. Ignored -completely if \code{tf_wrap} is \code{FALSE}.} +\item{max_width}{(\code{integer(1)}, \code{string} or \code{NULL})\cr width that title and footer (including +footnotes) materials should be word-wrapped to. If \code{NULL}, it is set to the current print width of the +session (\code{getOption("width")}). If set to \code{"auto"}, the width of the table (plus any table inset) is +used. Parameter is ignored if \code{tf_wrap = FALSE}.} \item{verbose}{logical(1). Should extra debugging messages be shown. Defaults to \code{FALSE}.} -\item{page_type}{character(1). Name of a page type. See -\code{page_types}. Ignored when \code{pg_width} and \code{pg_height} -are set directly.} +\item{page_type}{(\code{string})\cr name of a page type. See \code{\link[formatters]{page_types}}. Ignored +when \code{pg_width} and \code{pg_height} are set directly.} -\item{font_family}{character(1). Name of a font family. An error -will be thrown if the family named is not monospaced. Defaults -to Courier.} +\item{font_family}{(\code{string})\cr name of a font family. An error will be thrown +if the family named is not monospaced. Defaults to \code{"Courier"}.} -\item{font_size}{numeric(1). Font size, defaults to 12.} +\item{font_size}{(\code{numeric(1)})\cr font size. Defaults to \code{12}.} -\item{lineheight}{numeric(1). Line height, defaults to 1.} +\item{lineheight}{(\code{numeric(1)})\cr line height. Defaults to \code{1}.} -\item{landscape}{logical(1). Should the dimensions of \code{page_type} -be inverted for landscape? Defaults to \code{FALSE}, ignored when -\code{pg_width} and \code{pg_height} are set directly.} +\item{landscape}{(\code{flag})\cr whether the dimensions of \code{page_type} should be +inverted for landscape orientation. Defaults to \code{FALSE}, ignored when \code{pg_width} and +\code{pg_height} are set directly.} -\item{pg_width}{numeric(1). Page width in inches.} +\item{pg_width}{(\code{numeric(1)})\cr page width in inches.} -\item{pg_height}{numeric(1). Page height in inches.} +\item{pg_height}{(\code{numeric(1)})\cr page height in inches.} -\item{margins}{numeric(4). Named numeric vector containing \code{'bottom'}, -\code{'left'}, \code{'top'}, and \code{'right'} margins in inches. Defaults -to \code{.5} inches for both vertical margins and \code{.75} for both -horizontal margins.} +\item{margins}{(\code{numeric(4)})\cr named numeric vector containing \code{"bottom"}, \code{"left"}, +\code{"top"}, and \code{"right"} margins in inches. Defaults to \code{.5} inches for both vertical +margins and \code{.75} for both horizontal margins.} \item{cpp}{numeric(1) or NULL. Width (in characters) of the pages for horizontal pagination. \code{NA} (the default) indicates \code{cpp} should be inferred from the page size; \code{NULL} indicates no horizontal pagination should be done regardless of page size.} -\item{tf_wrap}{logical(1). Should the texts for title, subtitle, -and footnotes be wrapped?} +\item{tf_wrap}{(\code{flag})\cr whether the text for title, subtitles, and footnotes should be wrapped.} } \value{ for \code{pag_tt_indices} a list of paginated-groups of row-indices of \code{tt}. For \code{paginate_table}, @@ -146,52 +140,50 @@ implemented in the \code{formatters} package: -Pagination is performed independently in the vertical and horizontal -directions based solely on a \emph{pagination data.frame}, which includes the +Pagination is performed independently in the vertical and horizontal +directions based solely on a \emph{pagination data frame}, which includes the following information for each row/column: \itemize{ -\item number of lines/characters rendering the row will take \strong{after +\item Number of lines/characters rendering the row will take \strong{after word-wrapping} (\code{self_extent}) -\item the indices (\code{reprint_inds}) and number of lines (\code{par_extent}) +\item The indices (\code{reprint_inds}) and number of lines (\code{par_extent}) of the rows which act as \strong{context} for the row -\item the row's number of siblings and position within its siblings +\item The row's number of siblings and position within its siblings } -Given \code{lpp} (\code{cpp}) already adjusted for rendered elements which -are not rows/columns and a dataframe of pagination information, -pagination is performed via the following algorithm, and with a -\code{start = 1}: +Given \code{lpp} (\code{cpp}) is already adjusted for rendered elements which +are not rows/columns and a data frame of pagination information, +pagination is performed via the following algorithm with \code{start = 1}. Core Pagination Algorithm: \enumerate{ -\item Initial guess for pagination point is \code{start + lpp} (\code{start + cpp}) -\item While the guess is not a valid pagination position, and \code{guess > start}, decrement guess and repeat -} +\item Initial guess for pagination position is \code{start + lpp} (\code{start + cpp}) +\item While the guess is not a valid pagination position, and \code{guess > start}, +decrement guess and repeat. \itemize{ -\item an error is thrown if all possible pagination positions between -\code{start} and \code{start + lpp} (\code{start + cpp}) would ever be \verb{< start} +\item An error is thrown if all possible pagination positions between +\code{start} and \code{start + lpp} (\code{start + cpp}) would be \verb{< start} after decrementing } -\enumerate{ \item Retain pagination index -\item if pagination point was less than \code{NROW(tt)} (\code{ncol(tt)}), set +\item If pagination point was less than \code{NROW(tt)} (\code{ncol(tt)}), set \code{start} to \code{pos + 1}, and repeat steps (1) - (4). } -Validating pagination position: +Validating Pagination Position: Given an (already adjusted) \code{lpp} or \code{cpp} value, a pagination is invalid if: \itemize{ -\item The rows/columns on the page would take more than (adjusted) \code{lpp} lines/\code{cpp} -characters to render \strong{including} +\item The rows/columns on the page would take more than (adjusted) \code{lpp} lines/\code{cpp} +characters to render \strong{including}: \itemize{ \item word-wrapping \item (vertical only) context repetition } -\item (vertical only) footnote messages and or section divider lines +\item (vertical only) footnote messages and/or section divider lines take up too many lines after rendering rows \item (vertical only) row is a label or content (row-group summary) row -\item (vertical only) row at the pagination point has siblings, and +\item (vertical only) row at the pagination point has siblings, and it has less than \code{min_siblings} preceding or following siblings \item pagination would occur within a sub-table listed in \code{nosplitin} } diff --git a/man/rowclasses.Rd b/man/rowclasses.Rd index f928b6a09..e98f0a084 100644 --- a/man/rowclasses.Rd +++ b/man/rowclasses.Rd @@ -84,8 +84,7 @@ represents a single facet.} declared via strings (\code{"xx.x"}) or function. In cases such as \code{analyze} calls, they can character vectors or lists of functions.} -\item{na_str}{character(1). String that should be displayed when the value of \code{x} is missing. -Defaults to \code{"NA"}.} +\item{na_str}{(\code{string})\cr string to display when the value of \code{x} is missing. Defaults to \code{"NA"}.} \item{klass}{Internal detail.} diff --git a/man/split_rows_by.Rd b/man/split_rows_by.Rd index 1f1177e7c..0bf86f4f8 100644 --- a/man/split_rows_by.Rd +++ b/man/split_rows_by.Rd @@ -40,8 +40,7 @@ child (which are based on the data and type of split during tabulation).} declared via strings (\code{"xx.x"}) or function. In cases such as \code{analyze} calls, they can character vectors or lists of functions.} -\item{na_str}{character(1). String that should be displayed when the value of \code{x} is missing. -Defaults to \code{"NA"}.} +\item{na_str}{(\code{string})\cr string to display when the value of \code{x} is missing. Defaults to \code{"NA"}.} \item{nested}{boolean. Should this layout instruction be applied within the existing layout structure \emph{if possible} (\code{TRUE}, the default) or as a diff --git a/man/split_rows_by_multivar.Rd b/man/split_rows_by_multivar.Rd index ed14d6a19..f31fe4445 100644 --- a/man/split_rows_by_multivar.Rd +++ b/man/split_rows_by_multivar.Rd @@ -37,8 +37,7 @@ child (which are based on the data and type of split during tabulation).} declared via strings (\code{"xx.x"}) or function. In cases such as \code{analyze} calls, they can character vectors or lists of functions.} -\item{na_str}{character(1). String that should be displayed when the value of \code{x} is missing. -Defaults to \code{"NA"}.} +\item{na_str}{(\code{string})\cr string to display when the value of \code{x} is missing. Defaults to \code{"NA"}.} \item{nested}{boolean. Should this layout instruction be applied within the existing layout structure \emph{if possible} (\code{TRUE}, the default) or as a diff --git a/man/summarize_row_groups.Rd b/man/summarize_row_groups.Rd index 059141a6f..530b7d8b7 100644 --- a/man/summarize_row_groups.Rd +++ b/man/summarize_row_groups.Rd @@ -29,8 +29,7 @@ Comparison-based splits it can contain up to two \code{"\%s"}.} declared via strings (\code{"xx.x"}) or function. In cases such as \code{analyze} calls, they can character vectors or lists of functions.} -\item{na_str}{character(1). String that should be displayed when the value of \code{x} is missing. -Defaults to \code{"NA"}.} +\item{na_str}{(\code{string})\cr string to display when the value of \code{x} is missing. Defaults to \code{"NA"}.} \item{cfun}{list/function/NULL. tabulation function(s) for creating content rows. Must accept \code{x} or \code{df} as first parameter. Must accept diff --git a/man/tabclasses.Rd b/man/tabclasses.Rd index 69bd45993..d21710ccd 100644 --- a/man/tabclasses.Rd +++ b/man/tabclasses.Rd @@ -87,8 +87,7 @@ the content table for another \code{TableTree}.} declared via strings (\code{"xx.x"}) or function. In cases such as \code{analyze} calls, they can character vectors or lists of functions.} -\item{na_str}{character(1). String that should be displayed when the value of \code{x} is missing. -Defaults to \code{"NA"}.} +\item{na_str}{(\code{string})\cr string to display when the value of \code{x} is missing. Defaults to \code{"NA"}.} \item{indent_mod}{numeric. Modifier for the default indent position for the structure created by this function(subtable, content table, or row) diff --git a/man/table_shell.Rd b/man/table_shell.Rd index 891298d14..084c0a1b0 100644 --- a/man/table_shell.Rd +++ b/man/table_shell.Rd @@ -27,27 +27,22 @@ table_shell_str( \item{tt}{\code{TableTree} (or related class). A \code{TableTree} object representing a populated table.} -\item{widths}{numeric (or \code{NULL}). (proposed) widths for the columns -of \code{x}. The expected length of this numeric vector can be -retrieved with \code{ncol() + 1} as the column of row names must -also be considered.} +\item{widths}{(\code{numeric} or \code{NULL})\cr Proposed widths for the columns of \code{x}. The expected +length of this numeric vector can be retrieved with \code{ncol(x) + 1} as the column of row names +must also be considered.} -\item{col_gap}{numeric(1). Space (in characters) between columns} +\item{col_gap}{(\code{numeric(1)})\cr space (in characters) between columns.} -\item{hsep}{character(1). Characters to repeat to create -header/body separator line. If \code{NULL}, the object value will be -used. If \code{" "}, an empty separator will be printed. Check \code{\link[formatters:default_hsep]{default_hsep()}} -for more information.} +\item{hsep}{(\code{string})\cr character to repeat to create header/body separator line. If +\code{NULL}, the object value will be used. If \code{" "}, an empty separator will be printed. See +\code{\link[formatters:default_hsep]{default_hsep()}} for more information.} -\item{tf_wrap}{logical(1). Should the texts for title, subtitle, -and footnotes be wrapped?} +\item{tf_wrap}{(\code{flag})\cr whether the text for title, subtitles, and footnotes should be wrapped.} -\item{max_width}{integer(1), character(1) or \code{NULL}. Width that title -and footer (including footnotes) materials should be -word-wrapped to. If \code{NULL}, it is set to the current print width -of the session (\code{getOption("width")}). If set to \code{"auto"}, -the width of the table (plus any table inset) is used. Ignored -completely if \code{tf_wrap} is \code{FALSE}.} +\item{max_width}{(\code{integer(1)}, \code{string} or \code{NULL})\cr width that title and footer (including +footnotes) materials should be word-wrapped to. If \code{NULL}, it is set to the current print width of the +session (\code{getOption("width")}). If set to \code{"auto"}, the width of the table (plus any table inset) is +used. Parameter is ignored if \code{tf_wrap = FALSE}.} } \value{ for \code{table_shell_str} the string representing the table shell, for \code{table_shell}, diff --git a/man/tostring.Rd b/man/tostring.Rd index 05903fbc1..6a6c72cab 100644 --- a/man/tostring.Rd +++ b/man/tostring.Rd @@ -16,51 +16,44 @@ ) } \arguments{ -\item{x}{ANY. Object to be prepared for rendering.} +\item{x}{(\code{ANY})\cr object to be prepared for rendering.} -\item{widths}{numeric (or \code{NULL}). (proposed) widths for the columns -of \code{x}. The expected length of this numeric vector can be -retrieved with \code{ncol() + 1} as the column of row names must -also be considered.} +\item{widths}{(\code{numeric} or \code{NULL})\cr Proposed widths for the columns of \code{x}. The expected +length of this numeric vector can be retrieved with \code{ncol(x) + 1} as the column of row names +must also be considered.} -\item{col_gap}{numeric(1). Space (in characters) between columns} +\item{col_gap}{(\code{numeric(1)})\cr space (in characters) between columns.} -\item{hsep}{character(1). Characters to repeat to create -header/body separator line. If \code{NULL}, the object value will be -used. If \code{" "}, an empty separator will be printed. Check \code{\link[formatters:default_hsep]{default_hsep()}} -for more information.} +\item{hsep}{(\code{string})\cr character to repeat to create header/body separator line. If +\code{NULL}, the object value will be used. If \code{" "}, an empty separator will be printed. See +\code{\link[formatters:default_hsep]{default_hsep()}} for more information.} \item{indent_size}{numeric(1). Number of spaces to use per indent level. Defaults to 2} -\item{tf_wrap}{logical(1). Should the texts for title, subtitle, -and footnotes be wrapped?} +\item{tf_wrap}{(\code{flag})\cr whether the text for title, subtitles, and footnotes should be wrapped.} -\item{max_width}{integer(1), character(1) or \code{NULL}. Width that title -and footer (including footnotes) materials should be -word-wrapped to. If \code{NULL}, it is set to the current print width -of the session (\code{getOption("width")}). If set to \code{"auto"}, -the width of the table (plus any table inset) is used. Ignored -completely if \code{tf_wrap} is \code{FALSE}.} +\item{max_width}{(\code{integer(1)}, \code{string} or \code{NULL})\cr width that title and footer (including +footnotes) materials should be word-wrapped to. If \code{NULL}, it is set to the current print width of the +session (\code{getOption("width")}). If set to \code{"auto"}, the width of the table (plus any table inset) is +used. Parameter is ignored if \code{tf_wrap = FALSE}.} } \value{ a string representation of \code{x} as it appears when printed. } \description{ -Transform a complex object into a string representation ready -to be printed or written to a plain-text file +Transform a complex object into a string representation ready to be printed or written +to a plain-text file. -All objects that are printed to console pass by \code{toString}. This function allows -fundamental formatting specifications for the final output, like column widths and -relative wrapping (\code{width}), title and footer wrapping (\code{tf_wrap = TRUE} and -\code{max_width}), or horizontal separator character (e.g. \code{hsep = "+"}). +All objects that are printed to console pass via \code{toString}. This function allows +fundamental formatting specifications to be applied to final output, like column widths +and relative wrapping (\code{width}), title and footer wrapping (\code{tf_wrap = TRUE} and +\code{max_width}), and horizontal separator character (e.g. \code{hsep = "+"}). } \details{ -Manual insertion of newlines is not supported when \code{tf_wrap} is on -and will result in a warning and undefined wrapping behavior. Passing -vectors of already split strings remains supported, however in this -case each string is word-wrapped separately with the behavior -described above. +Manual insertion of newlines is not supported when \code{tf_wrap = TRUE} and will result in a warning and +undefined wrapping behavior. Passing vectors of already split strings remains supported, however in this +case each string is word-wrapped separately with the behavior described above. } \examples{ library(dplyr) diff --git a/man/tt_to_flextable.Rd b/man/tt_to_flextable.Rd index db64e25fc..8f0083d06 100644 --- a/man/tt_to_flextable.Rd +++ b/man/tt_to_flextable.Rd @@ -78,15 +78,12 @@ regardless of page size.} \item{colwidths}{numeric vector. Column widths for use with vertical pagination.} -\item{tf_wrap}{logical(1). Should the texts for title, subtitle, -and footnotes be wrapped?} - -\item{max_width}{integer(1), character(1) or \code{NULL}. Width that title -and footer (including footnotes) materials should be -word-wrapped to. If \code{NULL}, it is set to the current print width -of the session (\code{getOption("width")}). If set to \code{"auto"}, -the width of the table (plus any table inset) is used. Ignored -completely if \code{tf_wrap} is \code{FALSE}.} +\item{tf_wrap}{(\code{flag})\cr whether the text for title, subtitles, and footnotes should be wrapped.} + +\item{max_width}{(\code{integer(1)}, \code{string} or \code{NULL})\cr width that title and footer (including +footnotes) materials should be word-wrapped to. If \code{NULL}, it is set to the current print width of the +session (\code{getOption("width")}). If set to \code{"auto"}, the width of the table (plus any table inset) is +used. Parameter is ignored if \code{tf_wrap = FALSE}.} \item{total_width}{numeric(1). Total width in inches for the resulting \code{flextable(s)}. Defaults to 10.} diff --git a/man/varcuts.Rd b/man/varcuts.Rd index 4d6dfe9f9..7b216dd01 100644 --- a/man/varcuts.Rd +++ b/man/varcuts.Rd @@ -110,8 +110,7 @@ to \code{FALSE}} declared via strings (\code{"xx.x"}) or function. In cases such as \code{analyze} calls, they can character vectors or lists of functions.} -\item{na_str}{character(1). String that should be displayed when the value of \code{x} is missing. -Defaults to \code{"NA"}.} +\item{na_str}{(\code{string})\cr string to display when the value of \code{x} is missing. Defaults to \code{"NA"}.} \item{label_pos}{character(1). Location the variable label should be displayed, Accepts \code{"hidden"} (default for non-analyze row splits), \code{"visible"},