R/differential-component.r

Defines functions component

# extracts a component
component <- function(x, var) {
  if(is.null(x[[var]])) {
    R <- x[[1]]
    R[] <- 0
    return(R)
  }
  x[[var]]
}

Try the salad package in your browser

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

salad documentation built on April 4, 2025, 1:06 a.m.