Learn R Programming

dpcR (version 0.5)

num2int: Convert numeric to integer

Description

Converts numeric values to positive integers with a warning.

Usage

num2int(x)

Arguments

x

an numeric vector

Details

num2int uses as.integer functionality.

Examples

Run this code
# NOT RUN {
suppressWarnings(num2int(pi) == 3L)
# }

Run the code above in your browser using DataLab