Permalink
Browse files

Re-roxygenize

  • Loading branch information...
1 parent 3bbea7a commit 80920be5d8bed1d8bbf5ee322d1b55c572c85097 @wch wch committed Aug 12, 2012
Showing with 72 additions and 0 deletions.
  1. +1 −0 DESCRIPTION
  2. +3 −0 NAMESPACE
  3. +14 −0 man/as.envlist.Rd
  4. +37 −0 man/parent_envs.Rd
  5. +17 −0 man/print.envlist.Rd
View
@@ -65,3 +65,4 @@ Collate:
'metadata.r'
'create.r'
'session-info.r'
+ 'parent-envs.r'
View
@@ -1,4 +1,5 @@
export(add_path)
+export(as.envlist)
export(as.package)
export(bash)
export(build_vignettes)
@@ -35,6 +36,7 @@ export(loaded_packages)
export(missing_s3)
export(ns_env)
export(on_path)
+export(parent_envs)
export(parse_ns_file)
export(pkg_env)
export(release)
@@ -72,3 +74,4 @@ importFrom(tools,package_dependencies)
importFrom(tools,Rd2txt)
importFrom(utils,install.packages)
importFrom(whisker,whisker.render)
+S3method("[",envlist)
View
@@ -0,0 +1,14 @@
+\name{as.envlist}
+\alias{as.envlist}
+\title{Convert a list of environments to an \code{envlist} object.}
+\usage{
+ as.envlist(x)
+}
+\arguments{
+ \item{x}{A list of environments.}
+}
+\description{
+ Convert a list of environments to an \code{envlist}
+ object.
+}
+
View
@@ -0,0 +1,37 @@
+\name{parent_envs}
+\alias{parent_envs}
+\title{Given an environment or object, return an \code{envlist} of its
+parent environments.}
+\usage{
+ parent_envs(e = parent.frame())
+}
+\arguments{
+ \item{e}{An environment or other object.}
+}
+\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 parents
+parent_envs()
+
+# Print the parent environments of the load_all function
+e <- parent_envs(load_all)
+e
+
+# Print e without paths
+print(e, path = FALSE)
+
+# Print the first 6 environments in the envlist
+e[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)
+}
+
View
@@ -0,0 +1,17 @@
+\name{print.envlist}
+\alias{print.envlist}
+\title{Print an \code{envlist}}
+\usage{
+ print.envlist(x, name = TRUE, path = TRUE, ...)
+}
+\arguments{
+ \item{name}{If \code{TRUE} (the default), print the
+ \code{name} attribute of each environment.}
+
+ \item{path}{If \code{TRUE} (the default), print the
+ \code{path} attribute of each environment.}
+}
+\description{
+ Print an \code{envlist}
+}
+

0 comments on commit 80920be

Please sign in to comment.