validate_integer: Check whether a vector is an integer.

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

This function checks whether a vector is an integer.

Usage

1

Arguments

x

A vector.

Value

Returns a numeric (integer) vector (if valid) or NA (if not valid).

Examples

1
2
3
validate_integer(c(2, 6, 3.3, "", NA, "6", "hello, world"))

# [1]  2  6 NA NA NA  6 NA

capl documentation built on March 16, 2021, 9:06 a.m.