Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


safetyGraphics (version 1.1.0)

checkRequired: Check that the user has provided a valid for a given settings parameter

Description

Checks that a single required parameter from the settings list is provided by the user

Usage

checkRequired(key, settings)

Arguments

key

a list (like those provided by getSettingKeys()) defining the position of parameter in the settings object.

settings

The settings list used to generate a chart like eDISH()

Value

A list containing the results of the check following the format specified in validateSettings()[["checkList"]]

Examples

Run this code
# NOT RUN {
testSettings<-generateSettings(standard="AdAM")

#pass ($valid == TRUE)
safetyGraphics:::checkRequired(key=list("id_col"),
                                      settings=testSettings) 

#fails since filters aren't specified by default
safetyGraphics:::checkRequired(key=list("filters"),
                                      settings=testSettings) 

#fails since groups aren't specified by default
safetyGraphics:::checkRequired(key=list("groups",1,"value_col"),
                                      settings=testSettings) 
# }

Run the code above in your browser using DataLab