Learn R Programming

wdnr.gis (version 0.1.5)

check_args: Helper functions to aid in checking arguments to get_*_layer functions

Description

check_layer_args simply looks at the arguments that is passed to it and checks to make sure that at least one is not NULL. avoid_duplicate_sf_args ensures the presence of only one argument that would result in a downstream spatial query (i.e. only a single sf object can be used in a spatial query -- this function ensures that only one will be). deparse_arg_names is just a helper for the above two functions to format argument names in a useful way

Usage

check_layer_args(...)

avoid_duplicate_sf_args(...)

deparse_arg_names(...)

Value

If any of ... are not NULL, returns nothing. Otherwise stops function execution.

Arguments

...

Any number of objects to be checked

Examples

Run this code
if (FALSE) {
a <- NULL
b <- NULL
check_layer_args(a, b)
}

Run the code above in your browser using DataLab