Description Usage Arguments Details Examples
Turns long data into delimited data.
1 2 |
data |
a |
delimitThis |
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 delimitThis and byThis columns |
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).
1 | \code{delimited <- longToDelimited(myData, "soccerPlayers", "team")}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.