des.flex: Provide basic descriptives

View source: R/simple_descriptives2.R

des.flexR Documentation

Provide basic descriptives

Description

Simple descriptive statistics

Usage

des.flex(
  data,
  vars,
  param_set = "standard",
  by = NA,
  by_total = TRUE,
  deci = 1,
  option = r.flex.opts,
  title = ""
)

Arguments

data

data.frame with variables

vars

variables as formula. e.g. 1 ~ var1 + var2

param_set

list of parameters with order in the table (as strings):

  • default - "standard"

  • "simple" - N, Min, Max, M, SD

  • "standard" - N, M, SD, Min, Q1, C, Q3, Max, Skew, Kurt, SW, SWp

  • "report" - N, M, SD, Min, Q1, C, Q3, Max

  • other available statistics - missing values(Miss), Kolmogorov-Smirnov (KS, KSp), standard errors for Skewness and Kurtosis (SEskew, SEkurt)

by

section variable, default=FALSE, otherwise put variable name in quotes, e.g. "section_var". Section variable should have labels

by_total

boolean. If there is a section variable, should the total result be included in descriptives (default=TRUE)

deci

number of decimals for M, everything else is done automatically (default=1)

option

options variable. To change, modify r.flex.opts variable created by im_on_fire()

title

table title. If not set it will be determined automatically

Value

list with elements

  • type - table type - used for inserting in word document

  • 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)


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