Skip to main content

Rf_lang1

Function Rf_lang1 

Source
pub unsafe fn Rf_lang1(s: SEXP) -> SEXP
Expand description

Build a language object (call) with 1 element (the function).

Rust equivalent of R’s inline Rf_lang1(s). Creates a call like f() where s is the function.

§Safety

  • s must be a valid SEXP (typically a symbol or closure)
  • Must be called from R’s main thread
  • Result must be protected from GC