is_multiple() and is_duplicated() return TRUE if they detect, respectively, multiple different values of a variable (e.g. c(1, 2)), or duplicated values of a variable (e.g. c(1, 1)).

is_multiple(.data)

is_duplicated(.data)

Arguments

.data

A vector.

Value

Logical.

See also

Other functions for internal use in other fgeo packages: flag_if(), guess_plotdim()

Other functions to check inputs: check_crucial_names(), flag_if_group()

Other functions for developers: check_crucial_names(), extract_insensitive(), flag_if_group(), nms_try_rename(), rename_matches(), type_ensure()

Examples

is_multiple(c(1, 2))
#> [1] TRUE
is_multiple(c(1, 1))
#> [1] FALSE
is_multiple(c(1, NA))
#> [1] FALSE

is_duplicated(c(1, 2))
#> [1] FALSE
is_duplicated(c(1, 1))
#> [1] TRUE
is_duplicated(c(1, NA))
#> [1] FALSE