Skip to contents

This function checks if a given variable is continuous numeric by checking if it is numeric and has at least 10 unique values.

Usage

is_continuous_numeric(x)

Arguments

x

A variable that you want to check.

Value

Logical. Returns TRUE if the variable is continuous numeric, FALSE otherwise.

Examples

is_continuous_numeric(c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)) # TRUE
#> [1] TRUE
is_continuous_numeric(c(1, 2, 3, 4, 5)) # FALSE
#> [1] FALSE
is_continuous_numeric(c('a', 'b', 'c')) # FALSE
#> [1] FALSE