loadImputed | R Documentation |
data.frames
Given a data.frame
from code
with the multiple
imputations of both exposures and phenotypes, join with a data.frame
with exposures' description, and object of class imExposomeSet
is created.
loadImputed( data, description, description.famCol = "family", description.expCol = "exposure", exposures.asFactor = 5, warnings = TRUE )
data |
The |
description |
|
description.famCol |
(default |
description.expCol |
(default |
exposures.asFactor |
(default |
warnings |
(default |
The coordination of the information is based in the columns .imp
and
.id
from the data.frame
obtained from mice
. The
division of exposures and phenotypes is based in description
data.frame
, that are the exposures. Hence, the elements in the
main data.frame
that are not in the description, are the
phentoypes.
An object of class imExposomeSet.
imExposomeSet for class description
data("me") # me is an imputed matrix of exposure and phenotyes path <- file.path(path.package("rexposome"), "extdata") description <- file.path(path, "description.csv") dd <- read.csv(description, header=TRUE, stringsAsFactors=FALSE) dd <- dd[dd$Exposure %in% colnames(me), ] ex_imp <- loadImputed(data = me, description = dd, description.famCol = "Family", description.expCol = "Exposure")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.