Skip to contents

Check if an object is of a specific atomic type (typeof()). The test is invariant to attributes such as class.

Usage

is_logical(x, n = NULL)

is_integer(x, n = NULL)

is_double(x, n = NULL, finite = NULL)

is_complex(x, n = NULL, finite = NULL)

is_character(x, n = NULL)

is_raw(x, n = NULL)

is_atomic(x, n = NULL)

is_numeric(x, n = NULL)

Arguments

x

[any] An object to test.

n

[integer(1) | NULL] Length of x, set to NULL to not test.

finite

[TRUE | FALSE | NULL] Whether all values of the vector are not NA, NaN, Inf, or -Inf. Set to NULL to not test. is_finite() is designed to allow more flexibility to this test.

Value

[TRUE | FALSE] The scalar result of the test.