is_discrete: Check to see if a numeric vector is discrete based number of...

is_discreteR Documentation

Check to see if a numeric vector is discrete based number of unique values

Description

A simple test intended to distinguish between discrete and continuous values for the purpose of choosing analytics visualization selection. The selection of a cutoff value is purely subjective.

Usage

is_discrete(x, cutoff = 100)

Arguments

x

a vector of numeric values

cutoff

maximum number of unique values in x before x is considered not discrete

Value

logical

Examples

is_discrete(1:10)
is_discrete(runif(1000))

johnaclouse/curios documentation built on June 14, 2022, 6:45 a.m.