make_mxfda {mxfda} | R Documentation |
Make mxFDA class object
Description
Used to create an object of class mxFDA
that can be used with the mxfda package for functional data analysis.
Usage
make_mxfda(metadata, spatial = NULL, subject_key, sample_key)
Arguments
metadata |
metadata with columns |
spatial |
spatial information, either list or df, with column |
subject_key |
column name in |
sample_key |
column linking |
Details
Value
S4 object of class mxFDA
Metadata |
slot of class |
Spatial |
slot of class |
subject_key |
slot of class |
sample_key |
slot of class |
univariate_summaries |
slot of class |
bivariate_summaries |
slot of class |
functional_pca |
slot of class |
functional_mpca |
slot of class |
functional_cox |
slot of class |
functional_mcox |
slot of class |
scalar_on_function |
slot of class |
Author(s)
Alex Soupir alex.soupir@moffitt.org
Examples
#select sample metadata
clinical = lung_df %>%
dplyr::select(image_id, patient_id, patientImage_id,
gender, age, survival_days, survival_status, stage) %>%
dplyr::distinct()
#select the spatial information
spatial = lung_df %>%
dplyr::select(-image_id, -gender, -age, -survival_days, -survival_status, -stage)
sample_id_column = "patientImage_id"
#create the mxFDA object
mxFDAobject = make_mxfda(metadata = clinical,
spatial = spatial,
subject_key = "patient_id",
sample_key = sample_id_column)