MseekOptions: MseekOptions

View source: R/Function_MseekOptions.R

MseekOptionsR Documentation

MseekOptions

Description

Load and/or change .MseekOptions. Call MseekOptions() without arguments to just load the config file (MseekOptions.json) into the R session as an object called .MseekOptions. Any argument provided will be added to .MseekOptions as a named list item, and will also be saved in the (MseekOptions.json) file so that the current settings can be loaded in future R sessions.

Usage

MseekOptions(..., defaults = F)

Arguments

...

parameters to be modified

defaults

if TRUE, default MseekOptions are loaded

Details

Some arguments have special behavior:

  • defaults setting MseekOptions(default = T) will reset all items in .MseekOptions to the defaults and save them to the comfig file

  • testMode setting MseekOptions(testMode = T) will disable saving the settings to the config file in this session

Value

generates a list called .MseekOptions in the global environment, and can add new items to that list.

Usage in Metaboseek

.MseekOptions itself is a list object, and therefore does not have reactive properties. However, upon startup of Metaboseek, .MseekOptions will be loaded into the session as values$GlobalOpts, so that the values can be used in a reactive context where they get invalidated when changed. Note that not all items in values$GlobalOpts are in .MseekOptions, but all items in .MseekOptions are in values$GlobalOpts. To save changes to input fields so that they are loaded back the next time the app starts, set up an observer that assigns the input value via MseekOptions(...).


mjhelf/Metaboseek documentation built on April 23, 2022, 12:09 p.m.