[R] How to define mutualy exclusive parameters of a function

Berry, Charles ccberry @end|ng |rom uc@d@edu
Thu Apr 26 18:42:36 CEST 2018



> On Apr 26, 2018, at 6:46 AM, Polychronis Kostoulas <polychronis.kostoulas using gmail.com> wrote:
> 
> Dear All,
> apologies if this is basic: I am writing a function:
> 
> fb<-function(mean, median, mode, a, b=0.95, lower=F)
> {....}
> 
> The arguments mean, median and mode are mutually exclusive (i.e. the user
> should define only one of these). How do I code this within the function?
> 

See

?missing

HTH,

Chuck



More information about the R-help mailing list