plot_baa: plot_baa

View source: R/plot_baa.R

plot_baaR Documentation

plot_baa

Description

Plot correlations among biological aging measures.

Usage

plot_baa(data, agevar, label, axis_type)

Arguments

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.

Details

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).

Examples

#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


dayoonkwon/BioAge documentation built on Oct. 11, 2023, 1:33 a.m.