Learn R Programming

sjmisc (version 2.6.3)

is_float: Check if a variable is of (non-integer) double type

Description

This function checks whether an input vector or value is a numeric non-integer (double), depending on fractional parts of the value(s).

Usage

is_float(x)

Arguments

x

A value, vector or data frame.

Value

TRUE if x is a floating value (non-integer double), FALSE otherwise.

Examples

Run this code
# NOT RUN {
is.double(4)
is_float(4)

is_float(4.2)

is_float(iris)

# }

Run the code above in your browser using DataLab