Example per-element data.frame for user functions
exampleElementData-ModelArray-method.Rd
Returns a copy of `phenotypes` with an extra column named by `scalar` populated with the selected element's values from the `ModelArray`. This mirrors the per-element data that `ModelArray.wrap` passes to user functions (`data = dat`).
Usage
# S4 method for class 'ModelArray'
exampleElementData(x, scalar = "FD", i_element = 1L, phenotypes)
Examples
if (FALSE) { # \dontrun{
h5_path <- system.file("extdata", "n50_fixels.h5", package = "ModelArray")
csv_path <- system.file("extdata", "n50_cohort.csv", package = "ModelArray")
ma <- ModelArray(h5_path, scalar_types = c("FD"))
phen <- read.csv(csv_path)
df <- exampleElementData(ma, scalar = "FD", i_element = 1, phenotypes = phen)
} # }