[R] check if a certain ... argument has been passed on to my user-defined function

Matthias Kohl Matthias.Kohl at stamats.de
Fri Dec 12 05:13:41 CET 2008


and take a look at
?hasArg

hth,
Matthias

Charles C. Berry wrote:
>
>
> See
>
>     ?match.call
>
> and note the expand.dots arg.
>
> HTH,
>
> Chuck
>
>
> On Thu, 11 Dec 2008, Mark Heckmann wrote:
>
>> Hi,
>>
>> How can I check if a certain ... argument has been passed on to my
>> user-defined function or not?
>>
>> foo <- function(data, ...)
>> {
>> ### here I want to check whether xlab was passed with the ... arguments
>> ### or if the ... arguments did not contain an xlab argument
>> }
>>
>> I tried  missing(xlab)  , exists(xlab) and several other things but 
>> did not
>> find a solution.
>>
>> TIA,
>> Mark
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide 
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> Charles C. Berry                            (858) 534-2098
>                                             Dept of Family/Preventive 
> Medicine
> E mailto:cberry at tajo.ucsd.edu                UC San Diego
> http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 
> 92093-0901
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
Dr. Matthias Kohl
www.stamats.de



More information about the R-help mailing list