R/label_significance_level.R

Defines functions label_significance_level

## File Name: label_significance_level.R
## File Version: 0.04

############################
# helper function significance level
label_significance_level <- function( values, levels, labels ){
        ix <- sort( levels, index.return=TRUE)$ix
        levels <- levels[ix]
        labels <- labels[ix]
        NL <- length(levels)
        l1 <- ""
        values[ is.na(values) ] <- 1.2
        for (ll in 1:NL){
            l1 <- ifelse( values < levels[NL-ll+1], labels[NL-ll+1], l1)
                        }
        return(l1)
                }
###########################################

Try the CDM package in your browser

Any scripts or data that you put into this service are public.

CDM documentation built on Aug. 25, 2022, 5:08 p.m.