Skip to main content

Rf_lang2

Function Rf_lang2 

Source
pub unsafe fn Rf_lang2(s: SEXP, t: SEXP) -> SEXP
Expand description

Build a language object (call) with function and 1 argument.

Rust equivalent of R’s inline Rf_lang2(s, t). Creates a call like f(arg) where s is the function and t is the argument.

§Safety

  • Both SEXPs must be valid
  • Must be called from R’s main thread
  • Result must be protected from GC