Learn R Programming

xpose.xtras (version 0.0.2)

reshape_set: Convert xpose_set to a nested list.

Description

This amounts to a convenience function for tidy manipulations.

Usage

reshape_set(x)

unreshape_set(y)

Value

<tibble> Nested list, or <xpose_set>

Arguments

x

<xpose_set> An xpose_set object

y

<tibble> A nested table from an xpose_set

Examples

Run this code

rset <- reshape_set(xpdb_set)
# Properties (exposed and top-level) can be seen. xpdb objects are nested in the xpdb column.
rset %>% dplyr::select(-xpdb) %>% dplyr::glimpse()

unreshape_set(rset)

# The reversibility of reshaping can be confirmed:
identical(xpdb_set,reshape_set(xpdb_set) %>% unreshape_set())

Run the code above in your browser using DataLab