pgxMetaplot: Plot survival data of individuals

View source: R/pgxMetaplot.R

pgxMetaplotR Documentation

Plot survival data of individuals

Description

This function provides the survival plot from individual metadata.

Usage

pgxMetaplot(data, group_id, condition, return_data = FALSE, ...)

Arguments

data

The data frame returned by the pgxLoader function, containing survival data for individuals. The survival state is represented by Experimental Factor Ontology in the "followup_state_id" column, and the survival time is represented in ISO 8601 duration format in the "followup_time" column.

group_id

A string specifying which column is used for grouping in the Kaplan-Meier plot.

condition

A string for splitting individuals into younger and older groups, following the ISO 8601 duration format. Only used if group_id is "age_iso".

return_data

A logical value determining whether to return the metadata used for plotting. Default is FALSE.

...

Other parameters relevant to KM plot. These include pval, pval.coord, pval.method, conf.int, linetype, and palette (see ggsurvplot from survminer)

Value

The KM plot from input data

Examples

individuals <- pgxLoader(type="individuals",filters="NCIT:C3512")
pgxMetaplot(individuals, group_id="age_iso", condition="P65Y")

progenetix/pgxRpi documentation built on Nov. 4, 2024, 11:31 p.m.