Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

codetools {codetools} R Documentation

Low Level Code Analysis Tools for R

Description

These functions provide some tools for analysing R code. Mainly intended to support the other tools in this package and byte code compilation.

Usage

collectLocals(e, collect) 
collectUsage(fun, name = "<anonymous>", ...) 
constantFold(e, env = NULL, fail = NULL) 
findFuncLocals(formals, body) 
findLocals(e, envir = .BaseEnv) 
findLocalsList(elist, envir = .BaseEnv)
flattenAssignment(e) 
getAssignedVar(e) 
isConstantValue(v, w) 
makeCodeWalker(..., handler, call, leaf) 
makeLocalsCollector(..., leaf, handler, isLocal, exit, collect) 
makeUsageCollector(fun, ..., name, enterLocal, enterGlobal, enterInternal,
                   startCollectLocals, finishCollectLocals, warn,
                   signal)
walkCode(e, w = makeCodeWalker()) 

Arguments

e

R expression.

elist

list of R expressions.

v

R object.

fun

closure.

formals

formal arguments of a closure.

body

body of a closure.

name

character.

env

character.

envir

environment.

w

code walker.

...

extra elements for code walker.

collect

function.

fail

function.

handler

function.

call

function.

leaf

function.

isLocal

function.

exit

function.

enterLocal

function.

enterGlobal

function.

enterInternal

function.

startCollectLocals

function.

finishCollectLocals

function.

warn

function.

signal

function.

Author(s)

Luke Tierney


[Package codetools version 0.2-18 Index]
codetools

Code Analysis Tools for R

v0.2-18
GPL
Authors
Luke Tierney <luke-tierney@uiowa.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.