plot_baa | R Documentation |
Plot correlations among biological aging measures.
plot_baa(data, agevar, label, axis_type)
data |
A dataset with projected biological aging measures for analysis. |
agevar |
A character vector indicating the names of the biological aging measures. |
label |
A character vector indicating the labels of the biological aging measures. Values should be formatted for displaying along diagonal of the plot. Names should be used to match variables and order is preserved. |
axis_type |
A character vector indicating the axis type (int or float). Use variable name to define the axis type. |
The figure plots associations among the different biological aging measures. Cells below the diagonal show scatter plots of the measures listed above the cell (x-axis) and to the right (y-axis). Cells above the diagonal show the Pearson correlations for the measures listed below the cell and to the left. For this analysis, KDM Biological Age and Levine Phenotypic Age measures are differenced from chronological age (i.e. plotted values = BA-CA).
#Create corplot of BAA with chronologicl age
agevar = c("kdm_advance0",
"phenoage_advance0",
"kdm_advance",
"phenoage_advance",
"hd",
"hd_log")
label = c("KDM\nBiological Age",
"Levine\nPhenotypic Age",
"Modified-KDM\nBiological Age",
"Modified-Levine\nPhenotypic Age",
"Homeostatic\nDysregulation",
"Log\nHomeostatic\nDysregulation")
axis_type = c("kdm_advance0"="float",
"phenoage_advance0"="float",
"kdm_advance"="float",
"phenoage_advance"="flot",
"hd"="flot",
"hd_log"="float")
f2 = plot_baa(data, agevar, labels, axis_type)
f2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.