R/env.R

Defines functions env env.formula

Documented in env env.formula

#' Get the environment
#' 
#' @param x object to get environoment from 
#' 
#' @details 
#' S3 returns the environment associated with an object. 
#' 
#' @return 
#' Environment
#' 
#' @export 

env <- function(x) UseMethod('env')


#' @details 
#' 
#' For a formula object, `env` returns the environment in the `.Environment` 
#' attribute. 
#' 
#' @examples 
#' 
#' env( lhs ~ rhs ) 
#' 
#' @rdname env
#' @export

env.formula <- function(x) 
  attr( x, ".Environment")

Try the formula.tools package in your browser

Any scripts or data that you put into this service are public.

formula.tools documentation built on May 2, 2019, 1:45 p.m.