Description Usage Arguments Value See Also Examples
This method allows to convert continuous exposures of an ExposomeSet
to categorical exposures using the n-percentile groups, defined by
ngroups
argument. By default, all levels are kept but if
intervals
is set to "extrem"
, the levels between the extrems
(aka. lowes and highest) are discarted and their values set to NA
.
1 2 3 4 5 6 7 8 | highAndLow(
object,
ngroups = 3,
intervals = "standard",
select,
drop = FALSE,
warnings = TRUE
)
|
object |
An object of class |
ngroups |
(default |
intervals |
(default |
select |
(optional) Subset of exposures where the discretization is applied. If missing, all exposures are used. |
drop |
(default |
warnings |
(defaulr |
A new ExposomeSet
with categorical exposures.
trans
to transform exposures,
standardize
to standardize exposures.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # No drop
data("exposome")
exp.hl <- highAndLow(expo, intervals = "standard", select = "ldde_lip")
dim(exp.hl)
# exposures samples phenotyes
# 105 1200 4
dim(expo)
# exposures samples phenotyes
# 104 1200 4
# exps.hl has 107 exposures: the original 104 plus the new
# 3 factored exposures
# Drop
exp.hl <- highAndLow(expo, intervals = "standard",
select = "ldde_lip", drop = TRUE)
dim(exp.hl)
# exposures samples phenotyes
# 104 1200 4
dim(expo)
# exposures samples phenotyes
# 104 1200 4
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.