Learn R Programming

JWileymisc (version 1.4.1)

param_summary_format: Format a data frame of summary statistics

Description

This functions nicely formats a data frame of parameter summary statistics and is designed to be used with the param_summary() function.

Usage

param_summary_format(d, digits = getOption("digits"), pretty = FALSE)

Value

A formatted data.table of summary statistics or a formated vector (if pretty = TRUE).

Arguments

d

A data frame of the parameter summary statistics

digits

Number of digits to round to for printing

pretty

Logical value whether prettified values should be returned. Defaults to FALSE.

Examples

Run this code
set.seed(1234)
xsum <- do.call(rbind, apply(matrix(rnorm(100*10), ncol = 10),
  2, param_summary))
rownames(xsum) <- letters[1:10]
param_summary_format(xsum)
param_summary_format(xsum, pretty = TRUE)

rm(xsum)

Run the code above in your browser using DataLab