vec_ext: vec_assert_numeric

Description Usage Arguments Value

Description

vec_assert_numeric

vec_cast_integerish

vec_assert_integerish

vec_is_integerish

Usage

1
2
3
4
5
6
7
vec_assert_numeric(x, size = NULL, arg = rlang::as_label(substitute(x)))

vec_cast_integerish(x, arg = rlang::as_label(x))

vec_assert_integerish(x, size = NULL, arg = rlang::as_label(substitute(x)))

vec_is_integerish(x, size = NULL, arg = rlang::as_label(substitute(x)))

Arguments

x

Vector to test.

size

Desired size. Can be NULL.

arg

Arg name for error message.

Value

Invisibly returns x cast to double()

x cast to integer() if x is coercible to integer() i.e. 5.0 is converted to 5L, while 5.1 triggers an exception.

Invisibly returns x cast to integer().

Returns TRUE if the input can be losslessly coerced to integer().


Ilia-Kosenkov/RLibs documentation built on Jan. 26, 2020, 2:21 p.m.