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

is.number

Check Values


Description

Returns a logical vector describing if a numeric elements is a number.

Usage

is.number(x)

Arguments

x

numeric vector

Details

is.number is TRUE if the value is numeric or complex and is not missing (NA or NaN).

Examples

is.number(32)
# [1] TRUE
is.number(matrix(1:20, nrow=2))
#      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
# [1,] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE  TRUE
# [2,] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE  TRUE
is.number(list(matrix(1:20, nrow=2), 1:4))
# [1] TRUE TRUE
is.number('s')
# [1] TRUE

splus2R

Supplemental S-PLUS Functionality in R

v1.3-3
GPL-2
Authors
William Constantine [aut], Tim Hesterberg [aut], Knut Wittkowski [ctb], Tingting Song [ctb], Bill Dunlap [ctb], Stephen Kaluzny [ctb, cre]
Initial release

We don't support your browser anymore

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