Learn R Programming

qwraps2 (version 0.5.2)

summary_table_042: Deprecated functions

Description

Functions listed here are deprecated. Replacement methods have been developed to replace these methods.

Usage

summary_table_042(x, summaries = qsummary_042(x))

# S3 method for qwraps2_summary_table_042 cbind(..., deparse.level = 1)

# S3 method for qwraps2_summary_table_042 rbind(..., deparse.level = 1)

qsummary_042(.data, numeric_summaries, n_perc_args, env)

tab_summary( x, n_perc_args = list(digits = 0, show_symbol = FALSE), envir = parent.frame() )

Arguments

x

a variable to summarize

summaries

a list of lists of formulea for summarizing the data set. See Details and examples.

...

qwraps2_summary_table_042 objects to bind together

deparse.level

integer controlling the construction of labels in the case of non-matrix-like arguments (for the default method): deparse.level = 0 constructs no labels; the default, deparse.level = 1 or deparse.level = 2 constructs labels from the argument names.

.data

a data.frame

numeric_summaries

a list of functions to use for summarizing numeric variables. The functions need to be provided as character strings with the single argument defined by the %s symbol.

n_perc_args

a list of arguments to pass to n_perc

env

environment to assign to the resulting formulae

envir

the environment to attach to the resulting formulea

Details

summary_table_042 and qsummary_042 have been redesigned with some changes to the api for version 0.5.0 of qwraps2. The version released up through version 0.4.2 have been placed here with the appended _042 on the function names. This will will for soft deprecation in 0.5.0 (warning), hard deprecation in later (error), and eventual removal from the package.

See Also

qable for marking up qwraps2_data_summary objects. group_by for grouped_df objects. The vignette("summary-statistics", package = "qwraps2") for detailed use of these functions and caveats.

cbind

rbind

Examples

Run this code
# NOT RUN {
data(mtcars2)
st <- summary_table_042(mtcars2[, c("mpg", "wt", "cyl_factor")])
print(st, markup = "markdown")

# build the summaries quickly
qs <- qsummary_042(mtcars2)

summary_table_042(mtcars2, summaries = qs[c("mpg", "cyl", "wt", "gear_factor")])

# the _042 method would only allow for summary by a variable is
# dplyr::group_by was used.  The updated version for qwraps2 version 0.5.0
# has a improved api to summarize by a variable much easier.
st <- summary_table_042(dplyr::group_by(mtcars2, transmission),
                  summaries = qs[c("mpg", "wt", "cyl", "cyl_character", "cyl_factor")])
print(st, markup = "markdown")

# }

Run the code above in your browser using DataLab