isNumeric.Rd
Checks if an SEXP is of Certain Type
isNumeric(s)
Declaration: src/include/Rinternals.h and src/include/Rdefines.h
Implementation: Inline function isNumeric(SEXP s)
, cf. src/include/Rinlinedfuns.h
(SEXP) An R object.
(Rboolean
) true
(=1) or false
(=0).
#include <Rinternals.h>
(SEXP);
Rboolean Rf_isNumeric#define isNumeric Rf_isNumeric
library(base)
is.numeric(integer(length = 2L)) ## TRUE
is.numeric(numeric(length = 2L)) ## TRUE
is.numeric(factor(c("a", "b"))) ## FALSE
is.numeric(logical(length = 2L)) ## FALSE but isNumeric() = true!