# public hadley /devtools

### Subversion checkout URL

You can clone with HTTPS or Subversion.

Fetching contributors…

Cannot retrieve contributors at this time

file 47 lines (38 sloc) 1.128 kb
 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 \name{parent_envs}\alias{parent_envs}\title{Given an environment or object, return an \code{envlist} of itsparent environments.}\usage{  parent_envs(e = parent.frame(), trim = TRUE)}\arguments{  \item{e}{An environment or other object.}  \item{trim}{If \code{TRUE} (the default), stop at the  global environment or the empty environment. If  \code{FALSE}, stop only at the empty environment (which  is the top-level environment).}}\description{  If \code{e} is not specified, it will start with  environment from which the function was called.}\examples{# Print the current environment and its parentsparent_envs()# Print the parent environments of the load_all functione <- parent_envs(load_all)e# Get all parent environments, going all the way to empty enve <- parent_envs(load_all, trim = FALSE)e# Print e with pathsprint(e, path = TRUE)# Print the first 6 environments in the envliste[1:6]# Print just the parent environment of load_all.# This is an envlist with one element.e[1]# Pull that environment out of the envlist and see what's in it.e[[1]]ls(e[[1]], all.names = TRUE)}
Something went wrong with that request. Please try again.