empty_env: Replace an object's environment with a simple, static...

View source: R/formula.utilities.R

empty_envR Documentation

Replace an object's environment with a simple, static environment.

Description

Replace an object's environment with a simple, static environment.

Usage

empty_env(object)

base_env(object)

Arguments

object

An object with the ⁠environment()<-⁠ method.

Value

An object of the same type as object, with updated environment.

Examples

f <- y~x
environment(f) # GlobalEnv

environment(empty_env(f)) # EmptyEnv



environment(base_env(f)) # base package environment



statnet.common documentation built on Oct. 6, 2024, 5:06 p.m.