fmt_est {metalite.ae}R Documentation

Format model estimator

Description

Formats mean sd/se to a format as x.x or x.x (x.xx) if both mean and sd/sd are defined.

Usage

fmt_est(
  mean,
  sd = rep(NA, length(mean)),
  digits = c(1, 1),
  width = c(4, 3) + digits
)

Arguments

mean

A numeric vector of mean value.

sd

A numeric vector of standard deviation value.

digits

Digits of each column, i.e., format as x.x (x.xx).

width

Width of each column.

Details

The function assumes 1 column or 2 columns:

Value

The same data frame with additional attributes for page features.

Specification

The contents of this section are shown in PDF user manual only.

Examples

fmt_est(mean(iris$Petal.Length), sd(iris$Petal.Length))
fmt_est(mean(iris$Petal.Length), sd(iris$Petal.Length), digits = c(2, 3))

[Package metalite.ae version 0.1.2 Index]