Description Usage Arguments See Also Examples
Expand the rows of a data frame
Copied and modified from remakeGenerator::expand()
under GPL>=3:
https://github.com/wlandau/remakeGenerator
1 | expandrows(df, n = 2, type = c("each", "times"))
|
df |
data frame |
n |
number of duplicates per row |
type |
character scalar. If |
1 2 3 4 5 | df <- data.frame(
ID = c('24601', 'Javert', 'Fantine'),
fate = c('fulfillment', 'confusion', 'misfortune'))
expandrows(df, n = 2, type = 'each')
expandrows(df, n = 2, type = 'times')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.