plot_individual_timeline: Get all episodes for a phenotype

View source: R/plot_timeline.R

plot_individual_timelineR Documentation

Get all episodes for a phenotype

Description

Given a phenotype and a list of episode data , extract events for this phenotype from all data sources

Usage

plot_individual_timeline(
  df.data.settings,
  ind_all_event_dt = NULL,
  lst.data = NULL,
  ind_identifier = 1234567,
  plot_medication = FALSE,
  keep_classifications = NULL,
  font_size = 5
)

Arguments

df.data.settings

data frame containing data settings

ind_all_event_dt

a data table containing all events for the target individual

lst.data

list of data tables with all episode data collapsed to separate datatables

ind_identifier

identifier of the target individual for the timeline to be visualized

Value

a data table with all events

Examples

lst.data.identifier<-lapply(lst.data,function(x) {x[, ("identifier") := lapply(.SD, as.numeric), .SDcols = "identifier"] })  set eid to numeric
lst.data.identifier<-lapply(lst.data,function(x) {setkey(x,identifier) }) # double check that everything has the same setkey.
plot_individual_timeline(df.data.settings,NULL,lst.data.identifier,ind_identifier="1234567")

niekverw/ukbpheno documentation built on Oct. 30, 2023, 9:17 p.m.