Description Usage Arguments Value Examples
Similar to tidyr::unnest
but lands rowids and value ids, and can work on remote data sources. Fairly expensive per-row operation, not suitable for big data.
1 2 3 4 5 6 7 8 9 |
data |
data.frame to work with. |
colName |
character name of column to expand. |
... |
force later arguments to be bound by name |
rowidSource |
optional character name of column to take row indices from (rowidDest must be NULL to use this). |
rowidDest |
optional character name of column to write row indices to (must not be an existing column name, rowidSource must be NULL to use this). |
idxDest |
optional character name of column to write value indices to (must not be an existing column name). |
tempNameGenerator |
temp name generator produced by wrapr::mk_tmp_name_source, used to record dplyr::compute() effects. |
expanded data frame where each value of colName column is in a new row.
1 2 3 4 5 | d <- data.frame(name= c('a','b'))
d$value <- list(c('x','y'),'z')
expandColumn(d, 'value',
rowidDest= 'origRowId',
idxDest= 'valueIndex')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.