FlattenLongData: FlattenLongData

FlattenLongDataR Documentation

FlattenLongData

Description

This function will take data in long format and flatten it

Usage

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
)

Arguments

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

Value

Returns a data table with the flattened dataset

Author(s)

Abraham Mathew

See Also

Other Data Preparation: AddDays(), AddMissingDates(), AddMonths(), AddWeeks(), AggregateTimeSeriesData(), CheckForMissingDates(), CreateOutputDates(), DoDataPartition(), FakeDataGenerator(), RemoveSpecialChars()


abmathewks/GoodeR documentation built on June 12, 2025, 1:48 a.m.