toInt {mmstat4}R 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")

[Package mmstat4 version 0.2.1 Index]