Description Usage Arguments Details
This function has been built in order to transform all the values corresponding to non-protected in to NA with ObservationFlag=M and methodFlag=u
1 2 3 4 5 6 | removeNonProtectedFlag(data, valueVar = "Value",
observationFlagVar = "flagObservationStatus",
methodFlagVar = "flagMethod", yearVar = "timePointYears",
missingObservationFlag = "M", missingMethodFlag = "u",
normalised = TRUE, denormalisedKey = "measuredElement",
flagValidTable = NULL, keepDataUntil = NULL)
|
data |
The data.table object to be manipulate |
valueVar |
The column name of data which contains the values for the variable to be modified. |
observationFlagVar |
The column name of the observation flag corresponding to value. |
methodFlagVar |
The column name of the method flag corresponding to value. |
missingObservationFlag |
The character value which is used to represent missing values in the observation flag. This value will be put in any column containing imputation data that is removed. |
missingMethodFlag |
The character value which is used to represent missing values in the method flag. This value will be put in any column containing imputation data that is removed. |
normalised |
logical, whether the data is normalised |
denormalisedKey |
optional, only required if the input data is not normalised.It is the name of the key that denormalises the data. |
keepDataUntil |
numeric It is possible to delete non-protected flag starting from a specific year. This feature is important when we need to impute missing values keeping data (protected or not) up to a specific year. This parameter allows specifying the year from which we want to start deleting non-protected figures. |
flagValidTable Table containing valid and protected flag combination. This table is generally recorded into the Flag package.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.