Learn R Programming

prada (version 1.48.0)

as.all: Coercion without introduction of NAs

Description

Coercion without introduction of NAs

Usage

as.all(x, what)

Arguments

x
an object.
what
character of length 1.

Value

what

Details

The function calls do.call(paste("as.", what, sep=""), list(x)), and checks whether any NAs were introduced.

See Also

as

Examples

Run this code
  as.all(runif(5)*10, "integer")

Run the code above in your browser using DataLab