FlattenLongData | R Documentation |
This function will take data in long format and flatten it
FlattenLongData(
WHICH_LONG_DATA,
GROUP_BY_VAR = c("Date_new"),
NEW_COLUMN_VAR = c("Currency"),
VALUE_VAR = c("Amount_new"),
AGG_METHOD = c("sum"),
DEBUG = TRUE
)
WHICH_LONG_DATA |
A data.table which contains data in long format |
GROUP_BY_VAR |
The variables that will comprise the grouping columns |
NEW_COLUMN_VAR |
The variables that will be added as new columns |
VALUE_VAR |
The numeric variable that will be aggregated in the new columns |
AGG_METHOD |
Aggregation method that will be used on each element in the ValueVar |
DEBUG |
If TRUE, the function will be run in debug mode |
Returns a data table with the flattened dataset
Abraham Mathew
Other Data Preparation:
AddDays()
,
AddMissingDates()
,
AddMonths()
,
AddWeeks()
,
AggregateTimeSeriesData()
,
CheckForMissingDates()
,
CreateOutputDates()
,
DoDataPartition()
,
FakeDataGenerator()
,
RemoveSpecialChars()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.