R/get_inv_col.R

Defines functions get_inv_col

Documented in get_inv_col

#' Color-codes dB values
#'
#' \code{get_inv_col} returns the color of a visual field location given its dB value, (e.g., white < 15dB, black > 15dB)
#' @param db A number of sensitivity threshold in dB
#' @return either white or black color for a visual field location
#' @examples
#' get_inv_col(25)
#' @export

get_inv_col <- function(db) {
    if (is.na(db))
        return(NA)
    if (db < 15)
        return("white")
    return("black")
}

Try the binovisualfields package in your browser

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

binovisualfields documentation built on March 13, 2020, 1:35 a.m.