isnumeric: Test for Numeric Argument

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Test whether argument is numeric or a data.frame with numeric columns.

Usage

1

Arguments

x

any object

Details

This function is used to check the validity of arguments for numeric functions. It is an attempt to emulate the behavior of internal generic math functions.

isNumeric differs from is.numeric in that data.frames with all columns numeric are accepted as numeric.

Value

TRUE or FALSE

Author(s)

Gordon Smyth

See Also

is.numeric, Math

Examples

1
2
3
4
5
isNumeric(3)
isNumeric("a")
x <- data.frame(a=c(1,1),b=c(0,1))
isNumeric(x)   # TRUE
is.numeric(x)  # FALSE

richierocks/limma2 documentation built on May 27, 2019, 8:47 a.m.