Description Usage Arguments Value
Some countries have specific date ranges for which they have valid data. For example, Belarus became a country in 1992, and therefore should not have data prior to 1992. If the user attempts to write data to this country at a point in time prior to 1992, an error will occur. This function contains the logic for removing such invalid country/year pairs.
1 | removeInvalidDates(data, context = swsContext.datasets[[1]])
|
data |
A data.table object, typically one which has been extracted from the SWS and modified/analyzed. |
context |
An element of type DatasetKey (which is defined in faosws). This object contains information on the domain and dataset of interest. It defaults to swsContext.datasets[[1]], which should usually be what is desired. |
A data.table object whose invalid rows have been removed. Ultimately, this function should work like the other data.table functions: modify the object in place and not return anything. However, row deletion cannot be done without copying in the current data.table framework. This issue is in progress: https://github.com/Rdatatable/data.table/issues/635.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.