Learn R Programming

sasLM (version 1.0.1)

tsum1: Table Summary with 1 independent (x) variable

Description

Summarize a continuous dependent (y) variable with one independent (x) variable.

Usage

tsum1(d, y, u, e=c("Mean", "SD", "N"), ou="", repl=list(c("length"), ("n")))

Value

A data.frame of summarized values. Row names are from e names. Column names are from the levels of the x variable.

Arguments

d

a data.frame or matrix with column names

y

y variable name, a continuous variable

u

x variable name, upper side variable

e

a vector of summary function names

ou

order of levels of the upper side x variable

repl

a list of strings to replace after summarization. The length of the list should be 2, and both elements should have the same length.

Author

Kyun-Seop Bae k@acr.kr

Details

A convenient summarization function for a continuous variable with one x variable.

See Also

tsum, tsum0, tsum2, tsum3

Examples

Run this code
  tsum1(CO2, "uptake", "Treatment")
  tsum1(CO2, "uptake", "Treatment", 
        e=c("mean", "median", "sd", "min", "max", "length"), 
        ou=c("chilled", "nonchilled"),
        repl=list(c("median", "length"), c("med", "n")))

Run the code above in your browser using DataLab