vctrs (version 0.0.0.9000)

vec_proxy_numeric: Numeric proxy

Description

vec_proxy_numeric() converts an object to it's numeric representation (if available). vec_restore_numeric() restores a numeric proxy back to the original type. The default methods allow any object built on a logical, integer, or numeric, to be coerced to numeric, and leave the result as is.

Usage

vec_proxy_numeric(x)

vec_restore_numeric(x, to)

Arguments

Examples

Run this code
# NOT RUN {
x <- new_vctr(-10:10)

abs(x)
x ^ 2
# }

Run the code above in your browser using DataCamp Workspace