This help topic is for R version 1.5.0. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/integer.html
integer {base}R Documentation

Integer Vectors

Description

Creates or tests for objects of type "integer".

Usage

integer(length = 0)
as.integer(x, ...)
is.integer(x)

Arguments

length

desired length.

x

object to be coerced or tested.

...

further arguments passed to or from other methods.

Value

integer creates a integer vector of the specified length. Each element of the vector is equal to 0. Integer vectors exist so that data can be passed to C or Fortran code which expects them.

as.integer attempts to coerce its argument to be of integer type. The answer will be NA unless the coercion succeeds. Real values larger in modulus than the largest integer are coerced to NA (unlike S which gives the most extreme integer of the same sign).

is.integer returns TRUE or FALSE depending on whether its argument is of integer type or not.


[Package base version 1.5.0 ]