neater.sumtab: Neater sumtab, summary tables

Description Usage Arguments Details Examples

View source: R/neater.sumtab.R

Description

returns a summary table froma dataset

Usage

1
neater.sumtab(dataset, interest.vars, summary.vars)

Arguments

dataset

The dataset containing variables to summarize

interest.vars

A list of the numeric variables you want summarized

summary.vars

A list of factorial variables you want the interest.vars split by

Details

Takes a data.frame and summarises the interest.vars by the summary.vars you specify

Outputs a table with columns: 1. Subset, 2 Sample size (N), 3:end summarised variables

Rows: 1. Full data characteristics, 2:end levels of summary.vars

Numeric variables are reported as mean (Sd)

Examples

1
2
3
4
set.seed(695)
x<-data.frame(gl(2,5,labels=c("Level 1", "Level 2")),rnorm(10,4))
names(x)<-c("factor.var","numeric.var")
neater.sumtab(dataset=x, interest.vars="numeric.var", summary.vars="factor.var")

dprocter/dpfuncs documentation built on May 21, 2019, 9:20 a.m.