validate_integer {capl}R 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


[Package capl version 1.39 Index]