comp.flex: Create comperimeter tables

View source: R/comperimeter.R

comp.flexR Documentation

Create comperimeter tables

Description

Function creates basic comperimeter flextable with optional descriptives. Variables must be labelled.

Usage

comp.flex(
  data,
  form,
  by = NA,
  by_total = TRUE,
  param = TRUE,
  vals_to_labs = TRUE,
  m.deci = 1,
  p.deci = 1,
  title = "",
  option = r.flex.opts
)

Arguments

data

dataset

form

formula specified as 1 ~ var1 + var2 +varX

by

section variable specified with quotes

by_total

should totals be included when using section variable (default=TRUE)

param

should parametrics (M and SD) be included (default=TRUE)

vals_to_labs

if TRUE values will be put in column headings and value labels in result list (default=TRUE)

m.deci

number of decimal points for parametrics (default=1)

p.deci

number of decimal points for percentages (default=1)

title

Table title (optional)

option

inherits from r.flex.opts

Value

list with elements

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

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

  • section - section variable title

  • table - flextable with results

  • tab.df - results as data.frame

  • orientation - suggested page orientation (P/L)

  • legend - vector of value labels for column headings


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