KMView: Survival analysis and plot the kaplan-meier curves

View source: R/KMView.R

KMViewR Documentation

Survival analysis and plot the kaplan-meier curves

Description

Survival analysis and plot the kaplan-meier curves

Usage

KMView(
  survdata,
  bio,
  os = "os",
  event = "event",
  adjust = c("age", "gender", "race"),
  interact = NULL,
  cut = c(0, 0.5, 1),
  labels = NULL,
  optimalCut = TRUE,
  pval.method = c("logrank", "cox"),
  pval.pos = c(0, 0.2),
  ...
)

Arguments

survdata

A data frame including the clinical information.

bio

A character or an integer, specifying which variable/column in the survdata should be used to predict the risk of patients.

os

A character or an integer, specifying the variable/column of overall survival.

event

A character or an integer, specifying the variable/column of outcome.

adjust

A vector of factors to include in the cox model, default c("age", "gender", "race").

interact

A factor that interact with 'bio'.

cut

A numeric vector for separating the patients into different groups, only available when 'bio' is a continuous variable.

labels

A character vector, specifying the labels for each patient group.

optimalCut

Boolean, indicating whether determin the ootimal cutpoint.

pval.method

logrank (default) or cox, indicating the method for the pvalue calculation.

pval.pos

Character, indicating the method for the pvalue calculation.

...

Other available parameters in ggsurvplot or ggadjustedcurves.

Value

A ggplot instance that allows further custimization.

Author(s)

Wubing Zhang


WubingZhang/ggView documentation built on March 11, 2024, 3:33 a.m.