R/capableOfProfmem.R

# A lookup-only-once version of capabilities("profmem")
# Benchmarking shows it's 8-10 times faster this way.
capableOfProfmem <- local({
  res <- NA
  function() {
    if (is.na(res)) {
      res <<- capabilities("profmem")
    }
    res
  }
})

Try the profmem package in your browser

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

profmem documentation built on Dec. 15, 2020, 5:07 p.m.