filter_arguments: extract the call arguments

View source: R/add_to_view.R

filter_argumentsR Documentation

extract the call arguments

Description

extract the normal call arguments, and embedded function call arguments and return as lists named according to their rendering functions.

Usage

filter_arguments(fun.name, ..., custom.config = FALSE)

Arguments

fun.name

the name of the rendering function

...

arguments to fun.name or an embedded function within it.

custom.config

logical to use custom or global config file

Value

list with arguments. List is named according to function names.

Examples

gs <- gsplot() %>% 
         points(x=1:5, y=1:5, xlim=c(0,10), ylim=c(0,10), 
               callouts(labels=c(rep(NA, 4), "oh")), 
               error_bar(offset.up=1))
gs

gsplot:::filter_arguments('points', x=2:6, y=2:6, ylim=c(-1, 11))$call.args
gsplot:::filter_arguments('points', x=1:5, y=1:5, xlim=c(0,10), ylim=c(0,10), 
               callouts(labels=c(rep(NA, 4), "oh")))$extracted.args

USGS-R/gsplot documentation built on April 17, 2023, 8:45 p.m.