Most functions in R have default arguments, and these are
specified in the function definition. For instance, the
following function has a default argument of 10 which is
used if none is specified:

do.it <- function(n=10) { rnorm(n) }
do.it()

Regards,

Andrew C. Ward

CAPE Centre
Department of Chemical Engineering
The University of Queensland
Brisbane Qld 4072 Australia
[EMAIL PROTECTED]


Quoting Nicholas Croglio <[EMAIL PROTECTED]>:

> 
> Greetings,
> Is there a way to create default arguments for
> functions?
> If there is, then please explain or forward me to the
> instructions.
> I could not find anything in the archives or in the
> manual under function or args.
> 
> Thanks
> -- 
> __________________________________________________________
> 
> 
> 
> CareerBuilder.com has over 400,000 jobs. Be smarter about
> your job search
> http://corp.mail.com/careers
> 
> ______________________________________________
> [EMAIL PROTECTED] mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to