as_base_r: Convert xlr types to their base R type

View source: R/as_base_r.R

as_base_rR Documentation

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)

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.

Value

The base type of the base R object.

Examples

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)

xlr documentation built on April 3, 2025, 6:07 p.m.