View source: R/convertInteger.R
| convertIntegers | R Documentation |
Convert numeric vector to integer vector if the numeric vector fully represents
an integer vector,
e.g. c(1, 5) to c(1L, 5L).
Otherwise the argument is returned unchanged.
convertIntegers(x)
x |
[any] |
Either an integer vector if conversion was done or x unchanged.
str(convertIntegers(1.0))
str(convertIntegers(1.3))
str(convertIntegers(c(1.0, 2.0)))
str(convertIntegers("foo"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.