Learn R Programming

tableone (version 0.5.0)

summary.ContTable: Shows all results in a ContTable class object

Description

This method shows all the data a ContTable class object has. This includes the (optionally stratified) part with summary statistics and , if available, p-values from the normal assupmtion-based test (oneway.test by default) and nonparametric test (kruskal.test by default).

Usage

## S3 method for class 'ContTable':
summary(object, digits = 2, ...)

Arguments

object
An object that has the ContTable class to be shown.
digits
Number of digits to print.
...
For compatibility with generic. Ignored.

Value

  • It will print the results.

See Also

CreateContTable, print.ContTable, summary.ContTable, CreateCatTable, print.CatTable, summary.CatTable, CreateTableOne, print.TableOne, summary.TableOne

Examples

Run this code
## Load
library(tableone)

## Load Mayo Clinic Primary Biliary Cirrhosis Data
library(survival)
data(pbc)
## Check variables
head(pbc)

## Create an overall table for continuous variables
contVars <- c("time","age","bili","chol","albumin","copper",
              "alk.phos","ast","trig","platelet","protime")
contTableOverall <- CreateContTable(vars = contVars, data = pbc)

## Simply typing the object name will invoke the print.ContTable method,
## which will show the sample size, means and standard deviations.
contTableOverall

## To further examine the variables, use the summary.ContTable method,
## which will show more details.
summary(contTableOverall)

Run the code above in your browser using DataLab