fillRecord: This function replaces non-existing records with missing...

Description Usage Arguments Value

Description

Occastionally the database may return records where all three columns (value, observation flag, method flag) are all NA and is a non-existing record in the database; this can also be created when denormalising data. We will replace is with a missing record representation where (Value = NA, flagObservationStatus = "M" and flagMethod = "u").

Usage

1
2
3
4
fillRecord(data, areaVar = "geographicAreaM49", itemVar = "measuredItemCPC",
  elementVar = "measuredElement", yearVar = "timePointYears",
  valueVar = "Value", flagObsVar = "flagObservationStatus",
  flagMethodVar = "flagMethod")

Arguments

data

The dataset

areaVar

The column name corresponding to the geographic area.

itemVar

The column name corresponding to the commodity item.

elementVar

The column name corresponds to the measured element.

yearVar

The column name corresponds to the time dimension.

valueVar

The regular expression to capture the value column.

flagObsVar

The regular expression to capture the observation status flag column.

flagMethodVar

The regular expression to capture the method flag column.

Value

dataset with identical dimension but creates missing record in place of non-existing record.


SWS-Methodology/faoswsProcessing documentation built on June 19, 2019, 5:14 p.m.