When a R function is defined in an ordinary
fashion (i.e., assigning a function by <- function(...)
)
would be subject to ambiguity particularly if the function
name is the same as the generic function name(s).
This function supports detecting classes of arguments in
a loosely defined function.
Arguments
- args
Any list, but preferably generated by
list(...)
inside a function.- search
character(1). Class name to search. Partial match is supported.
See also
Other Helper functions:
clip_ras_ext()
,
clip_vec_ext()
,
crs_check()
,
datamod()
,
dep_check()
,
dep_switch()
,
ext2poly()
,
get_clip_ext()
,
is_bbox_within_reference()
,
is_within_ref()
,
par_def_q()
,
reproject_b2r()
,
reproject_std()
,
vect_valid_repair()
Examples
df <- data.frame(a = 1, b = 3)
any_class_args(list(df), "data.frame")
#> [1] TRUE