R/vectorized.R

Defines functions is_vectorized

# simple function to test if a function is Vectorized
is_vectorized <- function(x) {
  is.function(x) && exists("FUN", environment(x), mode = "function") && exists("vectorize.args", environment(x))
}
r-lib/covr documentation built on April 9, 2024, 2:14 p.m.