Learn R Programming

xlr (version 1.0.3)

as_base_r: Convert xlr types to their base R type

Description

as_base_r converts xlr objects, xlr_table, xlr_numeric, xlr_integer, xlr_percent, and xlr_format to their base R type.

Usage

as_base_r(x)

Value

The base type of the base R object.

Arguments

x

a xlr object

Details

as_base_r is a generic. It is a wrapper around vec_data but will convert every object to its base type.

Examples

Run this code
library(xlr)

# We create a xlr objects
a <- xlr_numeric(1:100)
b <- xlr_percent(1:100/100)
tab <- xlr_table(mtcars,"a title","a footnote")

# now lets convert them back to their base types
as_base_r(a)
as_base_r(b)
as_base_r(tab)

Run the code above in your browser using DataLab