expandYear | R Documentation |
This is required due the sparse representation of databases. When a new round of processing commencing in 2015, since there are no data input nor previous imputation, the record does not exist and thus imputation or any processing has no record to replace. We need to expand the year variable in order to perform imputation.
expandYear(
data,
areaVar = "geographicAreaM49",
elementVar = "measuredElement",
itemVar = "measuredItemCPC",
yearVar = "timePointYears",
valueVar = "Value",
obsflagVar = "flagObservationStatus",
methFlagVar = "flagMethod",
newYears = NULL
)
data |
The dataset |
areaVar |
The column name corresponding to the geographic area. |
elementVar |
The column name corresponds to the measured element. |
itemVar |
The column name corresponding to the commodity item. |
yearVar |
The column name corresponds to the time dimension. |
valueVar |
The regular expression to capture the value column. |
New records created are not filled with flags, both observation status and method flag remains NA. The reason behind this is so that after the processing, if the record can not be populated with imputation then it will be dropped and not saved back to the database.
A new dataset with the year variable expanded
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.