extendr_api::functions

Function global_env

Source
pub fn global_env() -> Environment
Expand description

The “global” environment

use extendr_api::prelude::*;
test! {
    global_env().set_local(sym!(x), "hello");
    assert_eq!(global_env().local(sym!(x)), Ok(r!("hello")));
}