Simply declare the defaults where you specify the function arguments. e.g.
test <- function (x=4, y=5) x*y > test() [1] 20 Simon. Simon Blomberg, PhD Depression & Anxiety Consumer Research Unit Centre for Mental Health Research Australian National University http://www.anu.edu.au/cmhr/ [EMAIL PROTECTED] +61 (2) 6125 3379 > -----Original Message----- > From: Nicholas Croglio [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 22 July 2003 12:06 PM > To: [EMAIL PROTECTED] > Subject: [R] function default > > > > 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
