R/weight2flag.R

##' Function to convert information weight to flag.
##'
##' The function converts a numeric information weight back to a flag.
##'
##' @param flagObservationWeight The information weight of an observation.
##' @param flagTable The table mapping flags and weights.
##'
##' @export
##'

weight2flag = function(flagObservationWeight,
                       flagTable = flagWeightTable){
    index = match(flagObservationWeight, flagTable$flagObservationWeights)
    as.character(flagTable$flagObservationStatus[index])
}
SWS-Methodology/faoswsFlag documentation built on May 9, 2019, 11:47 a.m.