Dear R-users,
I'm trying to work out a way to set default values for arguments in a function
which includes the optional argument '...'.
In practice, I have a 'plot' method for a function which specifies different
types of plots. Every different plot should have different default arguments
Antonio,
You need to compare the names of list(...) with the arguments you wish to
check. Here's one way to do so (note that I replaced c with d, because c
is a function):
f - function(a, ...) {
argnames - names(list(...))
# check whether b is an argument
if(!(b %in%
On Wed, Dec 1, 2010 at 2:34 PM, antonio.gasparr...@lshtm.ac.uk wrote:
Dear R-users,
I'm trying to work out a way to set default values for arguments in a
function which includes the optional argument '...'.
In practice, I have a 'plot' method for a function which specifies different
types
Look at the code for plot.default to see how it handles this issue
usling locally defined versions of functions with (possibly) locally
set parameter values.
Cheers,
Bert
On Wed, Dec 1, 2010 at 6:39 PM, Gabor Grothendieck
ggrothendi...@gmail.com wrote:
On Wed, Dec 1, 2010 at 2:34 PM,
4 matches
Mail list logo