R/00_Utils.R

Defines functions updateBody

## Objects that must be defined early in collation because we use them
## _at top level_ in one or more ./*.R

## Replaces body(F) with result of substituting quoted arguments,
## where typically 'F' is a template for a set of "parallel" methods
updateBody <- function(F, ...) {
    body(F) <- do.call(substitute, list(body(F), as.list(sys.call())[-1L]))
    F
}

Try the Matrix package in your browser

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

Matrix documentation built on Aug. 13, 2024, 3:01 p.m.