remove0M: This function replaces value which are zero and has flag...

View source: R/remove0M.R

remove0MR Documentation

This function replaces value which are zero and has flag representing missing values with NA.

Description

TODO (Michael): This function is similar to the function in the faoswsUtil package, but enables multiple value and flag pairs and also returning the data object. This function should replace the original one in the faoswsUtil package

Usage

remove0M(data, valueVars, flagVars, missingFlag = "M")

Arguments

data

The data.table object containing the values.

valueVars

The value of the observation.

flagVars

The flag of the observation.

missingFlag

The value of the flag which denotes missing value.

Value

The data object with all the (0, M) replaced with (NA, M)


SWS-Methodology/faoswsProcessing documentation built on June 24, 2024, 6:57 a.m.