Skip to content

Commit

Permalink
split package
Browse files Browse the repository at this point in the history
  • Loading branch information
shajoezhu committed Nov 8, 2024
1 parent 41d2e06 commit 8e53458
Show file tree
Hide file tree
Showing 11 changed files with 1,293 additions and 21 deletions.
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ URL: https://github.com/insightsengineering/rtables.officer,
BugReports: https://github.com/insightsengineering/rtables.officer/issues
Depends:
formatters (>= 0.5.9),
flextable (>= 0.9.6),
magrittr (>= 1.5),
methods,
officer (>= 0.6.6),
R (>= 2.10),
rtables (>= 0.6.9)
rtables (>= 0.6.10.9003)
Imports:
checkmate (>= 2.1.0),
htmltools (>= 0.5.4),
Expand All @@ -31,9 +33,7 @@ Suggests:
broom (>= 1.0.6),
car (>= 3.0-13),
dplyr (>= 1.0.5),
flextable (>= 0.9.6),
knitr (>= 1.42),
officer (>= 0.6.6),
r2rtf (>= 0.3.2),
rmarkdown (>= 2.23),
survival (>= 3.3-1),
Expand All @@ -60,3 +60,4 @@ RoxygenNote: 7.3.2
Collate:
'package.R'
'tt_export.R'
'tt_as_flextable.R'
16 changes: 4 additions & 12 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,16 @@ export(import_from_tsv)
export(margins_landscape)
export(margins_potrait)
export(section_properties_default)
export(theme_docx_default)
export(theme_html_default)
export(tt_to_flextable)
export(word_mm_to_pt)
import(methods)
import(rtables)
importFrom(formatters,export_as_pdf)
importFrom(formatters,export_as_txt)
importFrom(htmltools,tagList)
importFrom(htmltools,tags)
importFrom(lifecycle,deprecated)
importFrom(magrittr,"%>%")
importFrom(stats,binom.test)
importFrom(stats,na.omit)
importFrom(stats,prop.test)
importFrom(stats,quantile)
importFrom(stats,relevel)
importFrom(stats,setNames)
importFrom(tools,file_ext)
importFrom(utils,head)
importFrom(utils,head.matrix)
importFrom(utils,read.table)
importFrom(utils,tail)
importFrom(utils,tail.matrix)
importFrom(utils,write.table)
55 changes: 55 additions & 0 deletions R/package.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,58 @@
#' @import methods
#' @import rtables
NULL


#' General argument conventions
#'
#' @param ... additional parameters passed to methods or tabulation functions.
#' @param alt_counts_df (`data.frame` or `tibble`)\cr alternative full dataset the rtables framework will use
#' *only* when calculating column counts.
#' @param colwidths (`numeric`)\cr a vector of column widths for use in vertical pagination.
#' @param cvar (`string`)\cr the variable, if any, that the content function should accept. Defaults to `NA`.
#' @param df (`data.frame` or `tibble`)\cr dataset.
#' @param hsep (`string`)\cr set of characters to be repeated as the separator between the header and body of
#' the table when rendered as text. Defaults to a connected horizontal line (unicode 2014) in locals that use a UTF
#' charset, and to `-` elsewhere (with a once per session warning). See [formatters::set_default_hsep()] for further
#' information.
#' @param indent_size (`numeric(1)`)\cr number of spaces to use per indent level. Defaults to 2.
#' @param inset (`numeric(1)`)\cr number of spaces to inset the table header, table body, referential footnotes, and
#' main_footer, as compared to alignment of title, subtitle, and provenance footer. Defaults to 0 (no inset).
#' @param label (`string`)\cr a label (not to be confused with the name) for the object/structure.
#' @param label_pos (`string`)\cr location where the variable label should be displayed. Accepts `"hidden"`
#' (default for non-analyze row splits), `"visible"`, `"topleft"`, and `"default"` (for analyze splits only). For
#' `analyze` calls, `"default"` indicates that the variable should be visible if and only if multiple variables are
#' analyzed at the same level of nesting.
#' @param na_str (`string`)\cr string that should be displayed when the value of `x` is missing. Defaults to `"NA"`.
#' @param obj (`ANY`)\cr the object for the accessor to access or modify.
#' @param object (`ANY`)\cr the object to modify in place.
#' @param page_prefix (`string`)\cr prefix to be appended with the split value when forcing pagination between
#' the children of a split/table.
#' @param path (`character`)\cr a vector path for a position within the structure of a `TableTree`. Each element
#' represents a subsequent choice amongst the children of the previous choice.
#' @param pos (`numeric`)\cr which top-level set of nested splits should the new layout feature be added to. Defaults
#' to the current split.
#' @param section_div (`string`)\cr string which should be repeated as a section divider after each group defined
#' by this split instruction, or `NA_character_` (the default) for no section divider.
#' @param spl (`Split`)\cr a `Split` object defining a partitioning or analysis/tabulation of the data.
#' @param table_inset (`numeric(1)`)\cr number of spaces to inset the table header, table body, referential footnotes,
#' and main footer, as compared to alignment of title, subtitles, and provenance footer. Defaults to 0 (no inset).
#' @param topleft (`character`)\cr override values for the "top left" material to be displayed during printing.
#' @param tr (`TableRow` or related class)\cr a `TableRow` object representing a single row within a populated table.
#' @param tt (`TableTree` or related class)\cr a `TableTree` object representing a populated table.
#' @param value (`ANY`)\cr the new value.
#' @param verbose (`flag`)\cr whether additional information should be displayed to the user. Defaults to `FALSE`.
#' @param x (`ANY`)\cr an object.
#'
#' @return No return value.
#'
#' @family conventions
#' @name gen_args
#' @keywords internal
gen_args <- function(df, alt_counts_df, spl, pos, tt, tr, verbose, colwidths, obj, x,
value, object, path, label, label_pos, # visible_label,
cvar, topleft, page_prefix, hsep, indent_size, section_div, na_str, inset,
table_inset,
...) {
NULL
}
Loading

0 comments on commit 8e53458

Please sign in to comment.