eventTab: Number of events tables

Description Usage Arguments Value See Also Examples

View source: R/eventsTab.R

Description

Creates a table for each risk, containing number of events up to given time in groups.

Usage

1
eventTab(time, risk, group, cens = NULL, title = "Number of Events")

Arguments

time

vector with times of the first event or follow-up, must be numeric.

risk

vector with type of event, can be numeric or factor/character.

group

vector with group variable, can be numeric or factor/character.

cens

value of 'risk' indicating censored observation (if NULL, the first value of 'risk' vector will be taken).

title

title of a table.

Value

A grob with n tables, where n is number of risks. Each table contains number of events that have happened in each group up to given time point (the time points correspond to breaks at x-axis of plots with cumulative incidence curves).

See Also

plotCuminc

Examples

1
2
eventTab(time = LUAD$time, risk = LUAD$event, group = LUAD$gender, cens = "alive",
title = "Number of events")

geneticsMiNIng/cr17 documentation built on Sept. 16, 2019, 7:23 a.m.