Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

trim_env

Make a copy of an environment with just the selected objects.


Description

Make a copy of an environment with just the selected objects.

Usage

trim_env(object, keep = NULL, ...)

## S3 method for class 'environment'
trim_env(object, keep = NULL, ...)

## Default S3 method:
trim_env(object, keep = NULL, ...)

Arguments

object

An environment or an object with environment() and environment()<- methods.

keep

A character vector giving names of variables in the environment (including its ancestors) to copy over, defaulting to dropping all. Variables that cannot be resolved are silently ignored.

...

Additional arguments, passed on to lower-level methods.

Value

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

Methods (by class)

  • environment: A method for environment objects.

  • default: Default method, for objects such as formula and function that have environment() and environment()<- methods.


statnet.common

Common R Scripts and Utilities Used by the Statnet Project Software

v4.4.1
GPL-3 + file LICENSE
Authors
Pavel N. Krivitsky [aut, cre] (<https://orcid.org/0000-0002-9101-3362>), Skye Bender-deMoll [ctb]
Initial release
2020-10-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.