draw.PDN.circle: Draw Personalized Disease Network for one patient

Description Usage Arguments Examples

Description

Draw Personalized Disease Network based on newtwork matrix

Usage

1
draw.PDN.circle(a0, dak)

Arguments

a0

one row of network matrix generated from comorbidity data matrix using buildnetworks

dak

one row of Ranks matrix for corresponding comorbidity data matrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#Select a subset of data for toy example
comorbidity_data = comorbidity_data[c(1:10),]
survival_data = survival_data[c(1:10),]
#  Find date cuts
k1 = datecut(comorbidity_data,survival_data[,1],survival_data[,2])
#  Build networks
a = buildnetworks(comorbidity_data,k1)

#  Graph individual patients
datark = t(apply(comorbidity_data,1,rank))
dak = sort(datark[1,])
#  draw PDN for the first patient
draw.PDN.circle(a[1,],dak)
#  draw PDN for the whole comorbidity data set
par(mfrow=c(2,5))
for(i in 1 : nrow(a)){
 dak = apply(datark,2,sort)
 draw.PDN.circle(a[i,],dak[i,])
 title(main=paste("Patient",i))
}

PDN documentation built on May 2, 2019, 3:10 p.m.