type_of

0th

Percentile

A Fuzzier Version of typeof()

Numerics that are equivalent to integers (e.g x == floor(x)) are classified as integers, and builtin and special functions are reported as closures.

Usage
type_of(object)
Arguments
object

the object to check the type of

Value

character(1L) the type of the object

Aliases
  • type_of
Examples
# NOT RUN {
type_of(1.0001)          # numeric
type_of(1.0)             # integer (`typeof` returns numeric)
type_of(1)               # integer (`typeof` returns numeric)
type_of(sum)             # closure (`typeof` returns builtin)
type_of(`$`)             # closure (`typeof` returns special)
# }
Documentation reproduced from package vetr, version 0.2.7, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.