valid_arg_level: Validate arguments

Description Usage Details

View source: R/validate_arg.R

Description

valid_arg_level() is a function used to validate the arguments for level and level_detail.

Usage

1
valid_arg_level(level, level_detail)

Details

This function is intended to be called by other querying functions within the fbicrime package, but not for external call by users.

It checks two things: 1) whether the input level is legal (i.e. one of 'agencies', 'national', 'regions', 'states'); 2) whether the input level matches level_detail. This function produces an error when level is 'national' but level_detail is not NULL, and when level is not 'national' but level_detail is NULL or is not specified.


SUN-Wenjun/fbicrime documentation built on Dec. 25, 2019, 5:12 a.m.