View source: R/miscellaneous.R
unfold_idx | R Documentation |
fold_idx
takes a dfidx, includes the indexes as stand alone
columns, remove the idx
column and return a data.frame, with an
ids
attribute that contains the informations about the
indexes. fold_idx
performs the opposite operation
unfold_idx(x)
fold_idx(x, pkg = NULL)
x |
a |
pkg |
if not |
a data.frame
for the unfold_dfidx
function, a dfidx
object for the fold_dfidx
function
Yves Croissant
mn <- dfidx(munnell, idx = c(region = "state", "year"), position = 3, name = "index")
mn2 <- unfold_idx(mn)
attr(mn, "ids")
mn3 <- fold_idx(mn2)
identical(mn, mn3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.