Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is_something

Testing Object Type


Description

Testing Object Type

is_NA tests if a variable is exactly NA (logical, character, numeric or integer)

isFALSE Tests if a variable is exactly FALSE.

isNumber tests if a variable is a single number

isReal tests if a variable is a single real number

isInteger tests if an object is a single integer

isString tests if an object is a character string.

is.dir tests if a filename is a directory.

is.file tests if a filename is a file.

hasNames tests if an object has names.

Usage

is_NA(x)

isFALSE(x)

isNumber(x)

isReal(x)

isInteger(x)

isString(x, y, ignore.case = FALSE)

is.dir(x)

is.file(x)

hasNames(x, all = FALSE)

Arguments

x

an R object

y

character string to compare with.

ignore.case

logical that indicates if the comparison should be case sensistive.

all

logical that indicates if the object needs all names non empty

Value

TRUE or FALSE

See Also


pkgmaker

Development Utilities for R Packages

v0.32.2
GPL (>= 2)
Authors
Renaud Gaujoux [aut, cre]
Initial release
2020-10-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.