| plotDNAmAge {methylclock} | R Documentation |
Plot DNAm age estimation vs chronological age.
plotDNAmAge(x, y, tit = "Horvath's method", clock = "chronological", ...)
x |
DNAm age estimation |
y |
Chronological age |
tit |
Plot title. Default is "Horvath's method". |
clock |
Type of clock 'chronological' or 'GA', default 'chronological' |
... |
Other plot parameters for ggplot |
Plot with estimated DNAmAge
library(tidyverse)
path <- system.file("extdata", package = "methylclock")
covariates <- read_csv(file.path(
path,
"SampleAnnotationExample55.csv"
))
age <- covariates$Age
MethylationData <- get_MethylationDataExample()
age.example55 <- DNAmAge(MethylationData)
plotDNAmAge(age.example55$Horvath, age)