Learn R Programming

rockchalk (version 1.8.111)

formatNumericSummaries: Numeric output data.frame from summarize is reformatted as one column per variable with summary statistics in the rows

Description

The summarizeNumeric function returns a data frame with the variable names on the rows and summary statistics (mean, median, std. deviation) in the columns. For consistency with appearance of R's summary function

Usage

formatNumericSummaries(x, digits = 2, ...)

Arguments

x

numeric summaries from summarize function

digits

Decimal values to display, defaults as 2.

...

Other arguments, currently not used

Value

A text matrix to represent the numeric input

Examples

Run this code
# NOT RUN {
set.seed(21234)
X <- matrix(rnorm(10000), ncol = 10)
Xsum <- summarize(X)
Xsum$numerics
formatNumericSummaries(Xsum$numerics)
formatNumericSummaries(Xsum$numerics, digits = 5)
# }

Run the code above in your browser using DataLab