as.vmr {rimu}R Documentation

Tidyversatile multiple-response objects

Description

The vmr class wraps the mr class using the vctrs package, for compatibility with tidyverse tbl_df objects (tibbles).

Usage

as.vmr(x, ...)
new_vmr(x, levels = unique(do.call(c, x))) 

Arguments

x

For as.vmr, an mr object or anything coercible to one. For new_vmr, a list of character vectors

...

not used

levels

the permitted levels for the object

Details

These objects need the vctrs and pillar packages to work, and need the tibble package to be useful.

Value

An object of class vmr

See Also

as.mr

The internals vignette for internal structure

Examples

if (requireNamespace("vctrs", quietly=TRUE)){
   data(nzbirds)
   nzbirds
   tidybirds<-as.vmr(nzbirds, na.rm=TRUE)
   tidybirds
}


[Package rimu version 0.6 Index]