usesDots: Checks for Use of ....

usesDotsR Documentation

Checks for Use of ....

Description

Find uses of ... in a function.

Usage

usesDots(fun)

Arguments

fun

a function

Value

A list of the calls in the function that use ....

Author(s)

Duncan Temple Lang

Examples

bar = 
function(x, y = rep(1, length(x)), ...)
{
    a = list(...)
    plot(x, y, ...)    
    if(a[1] > 2)
        text(x, y, ...)
        
}

d = usesDots(bar)

# In the default value of a formal argument/parameter
bar2 = 
function(..., .objs = list(...)) 
   sapply(.objs, class)

d = usesDots(bar2)

duncantl/CodeAnalysis documentation built on June 12, 2025, 6:44 a.m.