meantbl: meantbl function

View source: R/summary.R

meantblR Documentation

meantbl function

Description

creates mean tables from binary suites

Usage

meantbl(
  x,
  digs = 2,
  ftouse = mean,
  rwnames = "norowname",
  rwn_asvar = FALSE,
  rwn_asvar_lab = "variable",
  perc = FALSE,
  cnt = "none"
)

Arguments

x

dataset containing only binary variables

digs

digits to round the result to. default is 2

ftouse

function to use for calculations. default is mean

rwnames

vector of row names to use. default is none

rwn_asvar

boolean indicating whether to make the row names the first variable in the returned dataset. default is FALSE

rwn_asvar_lab

the variable name for the row name variable. to see this rwn_asvar should be TRUE. default is 'variable'

perc

boolean indicating if the results should be formatted as a percent

cnt

should an extra column be added that provides the counts as well as the percentages

Examples

meantbl_function()

clmacleod/highlandr documentation built on Oct. 11, 2023, 8:04 p.m.