Skip to content

Commit

Permalink
allow display/hide total column #7
Browse files Browse the repository at this point in the history
  • Loading branch information
elong0527 committed Oct 24, 2023
1 parent e4bd482 commit 61a73a5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
4 changes: 3 additions & 1 deletion R/interactive_table1.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ interactive_table1 <- function(meta,
parameter,
keep_total = TRUE,
keep_missing = TRUE,
total = TRUE,
column_header = TRUE,
var_listing = NULL,
download = "none",
Expand Down Expand Up @@ -34,7 +35,8 @@ interactive_table1 <- function(meta,
listing = listing,
histogram = TRUE,
type = type,
var_listing = var_listing
var_listing = var_listing,
display_total = total
)

# Display details in reactable
Expand Down
13 changes: 8 additions & 5 deletions R/metalite_table1.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#' Interactive table1
#'
#' @param formula a formula
#' @param data a data frame
#' @param id a variable name
#' @param var_listing a character vector of additional variables included in the listing.
#' @param download a character to enable download button. Allowed value include
#' @param formula an object of class "formula".
#' @param data a data frame that contain variables described in the `formula`.
#' @param id a character value to indicate subject/record id variable name in `data`.
#' @param var_listing a character vector of additional variables included in the drill down listing.
#' @param total a logical value to display or hide "Total" column.
#' @param download a character value to enable download button. Allowed value include
#' "none", "listing", "table", and 'all'.
#' @param type a character value to control section title (e.g. "Subjects", "Records")
#'
Expand All @@ -13,6 +14,7 @@ metalite_table1 <- function(formula,
data,
id,
var_listing = NULL,
total = TRUE,
download = "none",
type = NULL) {

Expand All @@ -39,6 +41,7 @@ metalite_table1 <- function(formula,
analysis = "metalite.table1:::interactive_table1",
population = "all",
observation = "inf",
total = total,
parameter = var
)

Expand Down
13 changes: 8 additions & 5 deletions man/metalite_table1.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 61a73a5

Please sign in to comment.