toInt: toInt

View source: R/toInt.R

toIntR Documentation

toInt

Description

Converts x to an integer. If the conversion fails or the integer is outside min and max then NA_integer_ is returned

Usage

toInt(x, min = -Inf, max = +Inf)

Arguments

x

input object

min

numeric: minimal value

max

numeric: maximal value

Value

a single integer value

Examples

toInt(3.0)
toInt("3.0")
toInt("test")

mmstat4 documentation built on May 29, 2024, 11:15 a.m.