export_glm_config | R Documentation |
Output GLM configuration to a '.yaml' or 'json' file
export_glm_config(gpa, file = "glm_config.yaml")
gpa |
the 'glm_pipeline_arguments' object with relevant fields already populated, including '$l1_models', '$l2_models', and/or '$l3_models'. |
file |
the filename for the exported configuration file |
This function exports the configuration of level 1, 2, and 3 GLM models in a 'glm_pipeline_arguments' (aka 'gpa') object to a YAML or JSON file. This allows the user to setup their models from this configuration file, rather than having to go through the building process manually (with prompts).
Typically, the user will first run 'build_l1_models', 'build_l2_models' (for multi-run data), and 'build_l3_models', then run 'export_glm_config' so that the decisions made during the build process are codified in the resulting file.
invisibly return the YAML/JSON syntax written to 'file'
## Not run:
gpa <- setup_glm_pipeline(analysis_name="flanker_test",
output_directory="/proj/mnhallqlab/no_backup/flanker_gnomes",
n_expected_runs = 2, tr = 2.0
run_data = run_df, subject_data = subject_df, trial_data = trial_df,
l1_models=NULL, l2_models=NULL, l3_models=NULL
)
# setup level 1 models through menu system
gpa <- build_l1_models(gpa)
# for multi-run data, setup level 2 models through menu system
gpa <- build_l2_models(gpa)
# setup level 3 models through menu system
gpa <- build_l3_models(gpa)
# export model configuration to YAML file
export_glm_config(gpa, file="my_glm_config.yaml")
# in future, we can build the models from the file, rather than menus
gpa <- build_l1_models(gpa, from_spec_file="my_glm_config.yaml")
gpa <- build_l2_models(gpa, from_spec_file="my_glm_config.yaml")
gpa <- build_l3_models(gpa, from_spec_file="my_glm_config.yaml")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.