ipla {rplec} | R Documentation |
Identify placental aging
Description
This function identifies placental aging based on the case-control aging difference. Placental aging is defined as the residual DNA-methylation-based (DNAm) gestational ages (GA). Only GA from 5 to 44 weeks' gestation are shown in the placental aging plot.
Usage
ipla(
aging,
ga,
phenotype,
case = "Case",
control = "Control",
method = NULL,
from = NULL,
to = NULL
)
Arguments
aging |
A data frame of residual DNA-methylation-based GA. This data
frame must be the output of |
ga |
A data frame of GA. There is only one column, i.e., |
phenotype |
A data frame of phenotype (optional. There is only one
column, i.e., |
case |
A character of of case name in |
control |
A character of of case name in |
method |
A character of of the method of statistical test (optional), i.e., "Mann-Whitney U" or "Permutation". |
from |
An integer from 5 to 44 indicating minimum GA (weeks) to be included in the statistical test. If it is undefined, the minimum GA in either case or control is applied. |
to |
An integer from 5 to 44 indicating maximum GA (weeks) to be included in the statistical test. If it is undefined, the maximum GA in either case or control is applied. |
Value
An ggplot object consisting the aging plot without or with statistical test results.
Examples
# Prepare data
data(aging)
data(ga)
data(phenotype)
# Identify placental aging
set.seed(1)
ipla(aging, ga, phenotype)
## Conduct statistical test
set.seed(1)
ipla(aging, ga, phenotype, method = "Mann-Whitney U")
## Conduct statistical test for a specific range of GA
set.seed(1)
ipla(aging, ga, phenotype, method = "Mann-Whitney U", from = 5, to = 20)