Description Usage Arguments Examples
Draw Personalized Disease Network based on newtwork matrix
1 | draw.PDN.circle(a0, dak)
|
a0 |
one row of network matrix generated from comorbidity data matrix using buildnetworks |
dak |
one row of Ranks matrix for corresponding comorbidity data matrix |
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))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.