This function updates settings objects to add a new setting parameter to the safetyGraphics shiny app
addSetting(text_key, label, description, setting_type,
setting_required = FALSE, column_mapping = FALSE, column_type = NA,
field_mapping = FALSE, field_column_key = "", setting_cat,
default = "", charts = c(), settingsLocation = getwd(),
overwrite = TRUE)
Text key indicating the setting name. '--'
delimiter indicates a nested setting
Label
Description
Expected type for setting value. Should be "character", "vector", "numeric" or "logical"
Flag indicating if the setting is required
Flag indicating if the setting corresponds to a column in the associated data
Expected type for the data column values. Should be "character","logical" or "numeric"
Flag indicating whether the setting corresponds to a field-level mapping in the data
Key for the column that provides options for the field-level mapping in the data
Setting category (data, measure, appearance)
Default value for non-data settings
character vector of charts using this setting
path where the custom settings will be loaded/saved. If metadata is not found in that location, it will be read from the package (e.g. safetyGraphics::settingsMetadata), and then written to the specified location once the new setting has been added.
overwrite any existing setting metadata? Note that having settings with the same name is not supported and will cause unexpected results. default = true
This function makes it easy for users to adds a new settings to the safetyGraphics shiny app by making updates to the underlying metadata used by the package. Specifically, the function adds a row to settingsMetadata.rda describing the setting.