Description Usage Arguments Details
Turns delimited data into long form data.
1 2 3 |
data |
a |
longThis |
the column that you want to become a delimited field |
byThis |
the Id column which seperates different delimited sections |
delimiter |
which delimiter do you want to use? Default is ", " |
filter |
a data.table |
returnDT |
NULL by default, can set to TRUE or FALSE to explicitly return a data.table. By default, a data.table is returned if table is a data.table, and a data.frame is returned if table is a data.frame. |
keepCols |
a vector of column names from |
allCols |
FALSE by default, if TRUE, sets keepCols to every column except for the toThis and byThis columns |
longThisClass |
optional, the class that you want the column of longThis to be in your final data. All delimited fields are going to be character vectors, as they include character delimiters, so the resulting longThis column is going to be of the class character. You may specify a different class here, ex. factor or numeric. |
... |
additional arguments to the |
Ex., imagine you have a table with 2 columns, the first is an Id column with "A" repeated 3 times, the second column has rows X then Y then Z. This function would turn this table from having three rows into having one row where X, Y, Z are delimited by some delimiter (the default is ", " like the above example).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.