freq.flex: Frequencies table

View source: R/freqs.R

freq.flexR Documentation

Frequencies table

Description

Frequencies table

Usage

freq.flex(
  data,
  form,
  deci = 1,
  has.NA = FALSE,
  title = "",
  option = r.flex.opts
)

Arguments

data

dataset

form

variables as formulas (e.g. 1~var1+var2+var3)

deci

number of decimals for percentages (default=1)

has.NA

should NA values be included (default=FALSE)

title

table title. If omitted it will be guessed

option

inherited from r.flex.opts

Value

list with four elements

  • type - table type - used for inserting in word document (x-is there a section, desc - are there descriptives)

  • title - used for table title. Can be set manually or automatically

  • table - flextable with results

  • tab.df - results as data.frame

  • orientation - suggested page orientation (P/L)

Examples

set.r.flex.opts()
data(mtcars)
freq.flex(mtcars, 1 ~ gear + cyl)

mrajter/rajter.flex documentation built on July 30, 2024, 1:31 a.m.