R/tools.R

Defines functions get_name

vegetation <- c(
    "MPL_BrBG", "NEO_div_vegetation_a", "NEO_div_vegetation_b", "NEO_div_vegetation_c",
    "NEO_modis_ndvi", "NOC_ndvi", "vegetation_ClarkU", "vegetation_modis"
)


# NULL name will be replaced with `seq_along(x)`
get_name <- function(x) {
    names(x) %>% { if(is.null(.)) seq_along(x) else . }
}

Try the rcolors package in your browser

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

rcolors documentation built on April 23, 2021, 5:07 p.m.