summarize.class: Summary Table Creation

Description Usage Arguments Examples

Description

This function allows you to create a summary of variables table with LaTeX formatting options.

Usage

1
2
3
4
summarize.class(tmat, digits = 2, quants = c(0, 0.25, 0.5, 0.75, 1),
  SD = TRUE, nmis = FALSE, uniq = FALSE, str = FALSE, latex = FALSE,
  full.latex = FALSE, lookup.names = NULL, filename = NULL,
  screen = FALSE, caption = NULL)

Arguments

tmat

Data matrix

digits

The number of digits to round the values to.

quants

Vector of quantiles to include in the table. Values should be in [0,1].

SD

Logical, include a column for standard deviations. Defaults to TRUE.

nmis

Logical, include a column for the number of missing observations.

uniq

Logica, include a column for the number of categories in the variable. Defaults to FALSE.

str

Logical, include a column for the class of each variable. Defaults to FALSE.

latex

Logical, returns table in LaTeX format via the xtable package.

full.latex

Logical, TRUE if want latex output to be a stand-alone LaTeX file. If latex=TRUE and full.latex=FALSE, the output can be included with an \includefilename command. This may be useful if output from this function will be included as one part of a larger set of function calls.

lookup.names

Vector of longer descriptive variable names, where column names should match variable names in tmat.

filename

Name of file where output should be saved. Default is NULL, not to save it to a file.

screen

Logical, TRUE if want to view results on the screen. Defaults to FALSE.

caption

Caption for LaTeX format

Examples

1
2
test.dat<-data.frame(x=rnorm(10),y=as.factor(rbinom(10,1,.5)))
summarize.class(test.dat)

mathykathy26/kagRfun documentation built on May 29, 2019, 4:40 a.m.