R/utilities.R

Defines functions is.numericOrNull renameListElement

## small utilities that are not exported
renameListElement <- function(L, old, new) {
  if (is.null(L)) return(NULL)
  names(L)[match(old, names(L))] <- new
  L
}

is.numericOrNull <- function(x) {
  is.numeric(x) | is.null(x)
}

Try the growthrates package in your browser

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

growthrates documentation built on Nov. 3, 2020, 1:07 a.m.