isNumint {pedometrics} | R Documentation |
Tests for data types
Description
Evaluate the data type contained in an object.
Usage
isNumint(x)
allNumint(x)
anyNumint(x)
whichNumint(x)
allInteger(x)
anyInteger(x)
whichInteger(x)
allFactor(x)
anyFactor(x)
whichFactor(x)
allNumeric(x)
anyNumeric(x)
whichNumeric(x)
uniqueClass(x)
Arguments
x |
Object to be tested. |
Value
TRUE
or FALSE
depending on whether x
contains a given data type.
Author(s)
Alessandro Samuel-Rosa alessandrosamuelrosa@gmail.com
See Also
base::is.numeric()
, base::is.integer()
, base::is.factor()
.
Examples
# Vector of integers
x <- 1:10
isNumint(x) # FALSE
# Vector of numeric integers
x <- as.numeric(x)
isNumint(x) # TRUE
# Vector of numeric values
x <- c(1.1, 1, 1, 1, 2)
isNumint(x) # FALSE
allNumint(x) # FALSE
anyNumint(x) # TRUE
whichNumint(x)
# Single numeric integer
isNumint(1) # TRUE
# Single numeric value
isNumint(1.1) # FALSE
[Package pedometrics version 0.12.1 Index]