print.BalanceR: Print "BalanceR" Objects

View source: R/BalanceR.R

print.BalanceRR Documentation

Print "BalanceR" Objects

Description

Print "BalanceR" Objects

Usage

## S3 method for class 'BalanceR'
print(
  x,
  only.SB = FALSE,
  simplify = FALSE,
  abs = FALSE,
  digits = 3,
  ...
  )

Arguments

x

An object of class 'BalanceR'

only.SB

Display only standardized biases. Default is FALSE.

simplify

Display maximum standardized biases. When number of pairs is large, I recommend set this argument TRUE. Default is FALSE.

abs

Display absolute values of standardized biases. Default is FALSE.

digits

digits

...

Ignored.

Author(s)

Jaehyun Song <http://www.jaysong.net>

See Also

BalanceR, plot.BalanceR

Examples

## Not run: 
## S3 method for class 'BalanceR'
data(BlcDF)

BlcChk <- BalanceR(BlcDF, group = "Group",
                   cov = c(Sex, Age, Educ, Marriage))

## Display the result with 3 digits.
print(BlcChk, digits = 3)

## Display only standardized biases with 4 digits.
print(BlcChk, only.SB = TRUE, digits = 4)

## Display only absolute values of maximum standardized biases.
print(BlcChk, only.SB = TRUE, abs = TRUE, simplify = TRUE)

# A pipe operator (%>%) is also available
library(magrittr)

BlcChk %>%
    BalanceR(group = Group, cov = c(Sex, Age, Educ, Marriage)) %>%
    print(digits = 2)

## End(Not run)

JaehyunSong/BalanceR documentation built on March 12, 2023, 4:51 p.m.