Description Usage Arguments Details Value Note See Also Examples
Given the files that defines the exposome (measures of exposome, exposome description and individuals phentype) it loads them and creates an object of type ExposomeSet.
1 2 3 4 5 6 7 8 9 10 11 12 13 | readExposome(
exposures,
description,
phenotype,
sep = ",",
na.strings = c("NA", "-", "?", " ", ""),
exposures.samCol = "sample",
description.expCol = "exposure",
description.famCol = "family",
phenotype.samCol = "sample",
exposures.asFactor = 5,
warnings = TRUE
)
|
exposures |
String with the path to the file with the matrix of exposures. |
description |
String with the path to the file with the description of the exposures (relation between exposures and exposure-family). |
phenotype |
String with the path to the file with the phenotypes of interest. |
sep |
(default |
na.strings |
(default |
exposures.samCol |
(default |
description.expCol |
(default |
description.famCol |
(default |
phenotype.samCol |
(default |
exposures.asFactor |
(default |
warnings |
(default |
The rows of the exposure's file, that corresponds to samples' names, must be the same than the phenotype's file. In the same way, the columns in exposure's file must be the same found as rows in description file.
An object of class ExposomeSet.
ExposomeSet's fData
will contain some inner columns
called .std
, .trn
, .fct
and .type
in order to
trace the transformations an exposure suffers and to know, at eny moment, if
an exposure is categorical or continuous. The "description" file can
contains a column called type
with values "factor"
and
"numeric"
to speficy how an exposure needs to be understood. If
given, this column will be renamed to .type
. If not given, it will
be created using exposures.asFactor
value.
ExposomeSet for class description,
loadExposome for constructor from loaded
data.frame
s
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Locate the data-files
path <- file.path(path.package("rexposome"), "extdata")
description <- file.path(path, "description.csv")
phenotype <- file.path(path, "phenotypes.csv")
exposures <- file.path(path, "exposures.csv")
## Create ExposomeSet from files
exp <- readExposome(
exposures = exposures,
description = description,
phenotype = phenotype,
exposures.samCol = 1,
description.expCol = 2,
description.famCol = 1,
phenotype.samCol = 1
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.