Learn R Programming

teal.code (version 0.6.0)

lang2calls: Separate calls

Description

Converts language object or lists of language objects to list of simple calls.

Usage

lang2calls(x)

Value

Given a call, an expression, a list of calls or a list of expressions, returns a list of calls. Symbols and atomic vectors (which may get mixed up in a list) are returned wrapped in list.

Arguments

x

language object or a list of thereof

Examples

Run this code
# use non-exported function from teal.code
lang2calls <- getFromNamespace("lang2calls", "teal.code")
expr <- expression(
  i <- iris,
  m <- mtcars
)
lang2calls(expr)

Run the code above in your browser using DataLab