Learn R Programming

teal.code (version 0.6.0)

get_var: Get object from qenv

Description

[Deprecated] Instead of get_var() use native R operators/functions: x[[name]], x$name or get():

Retrieve variables from the qenv environment.

Usage

get_var(object, var)

# S3 method for qenv.error [[(x, i)

Value

The value of required variable (var) within qenv object.

Arguments

object, x

(qenv)

var, i

(character(1)) variable name.

Examples

Run this code
q <- qenv()
q1 <- eval_code(q, code = quote(a <- 1))
q2 <- eval_code(q1, code = "b <- a")
get_var(q2, "b")

Run the code above in your browser using DataLab