Compiles a generic R language object (such as an expression or function)
to bytecode using the C-based compiler backend.
Usage
compile(e, env = .GlobalEnv, options = NULL, srcref = NULL)
Arguments
- e
An R language object to compile.
- env
The environment in which to evaluate the object.
- options
A list of compilation options, or NULL.
- srcref
Optional source reference information.
Value
The compiled object, or invisible NULL if compilation is only for side effect.
Examples
expr <- quote({ x <- 1; x + 2 })
compile(expr)
#> <bytecode: 0x581046be9418>