validate_integer: Check whether a vector is an integer.

View source: R/utilities.R

validate_integerR Documentation

Check whether a vector is an integer.

Description

This function checks whether a vector is an integer.

Usage

validate_integer(x)

Arguments

x

A vector.

Value

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

Examples

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

# [1]  2  6 NA NA NA  6 NA


capl documentation built on April 8, 2022, 9:06 a.m.