Description Usage Arguments Value Author(s) References Examples
Creates a long dataset of "n" columns comprising the combinations of values from different columns.
1 | lengthener(indt, n = 2)
|
indt |
The input dataset. |
n |
The number of columns expected. Passed on to |
A data.table
.
Ananda Mahto
http://stackoverflow.com/q/35690478/1270695
1 2 3 | mydf <- as.data.frame(matrix(c(1,2,3,4,0,0,1,1), byrow = TRUE, nrow = 2))
lengthener(mydf, 2)
lengthener(mydf, 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.