is_fraction: Is fraction

View source: R/1_assertions.R

is_fractionR Documentation

Is fraction

Description

Is fraction

Usage

is_fraction(x, .xname = get_name_in_parent(x))

assert_is_fraction(x, .xname = get_name_in_parent(x))

Arguments

x

number

.xname

string

Value

TRUE or false

Examples

is_fraction(0.1)          # YES
is_fraction(1)            # YES
is_fraction(1.2)          # NO - more than 1
is_fraction(c(0.1, 0.2))  # NO - vector

bhagwataditya/importomics documentation built on July 11, 2024, 11:26 a.m.