isNumint | R Documentation |
Evaluate the data type contained in an object.
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)
x |
Object to be tested. |
TRUE
or FALSE
depending on whether x
contains a given data type.
Alessandro Samuel-Rosa alessandrosamuelrosa@gmail.com
base::is.numeric()
, base::is.integer()
, base::is.factor()
.
# 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.