Load a Compiled R File
loadcmp.RdLoads bytecode compiled by cmpfile into an environment.
Examples
tmp_r <- tempfile(fileext = ".R")
tmp_rc <- tempfile(fileext = ".Rc")
writeLines("f <- function(x) x * 2", tmp_r)
cmpfile(tmp_r, tmp_rc)
#> saving to file "/tmp/RtmpMmDEdi/file19436a802ce2.Rc" ... done
loadcmp(tmp_rc, .GlobalEnv)
f(3)
#> [1] 6