s-news
[Top] [All Lists]

allowing for missing arguments in functions

To: s-news@wubios.wustl.edu
Subject: allowing for missing arguments in functions
From: Eric yang <yang_eric9@yahoo.com>
Date: Fri, 25 Nov 2005 04:07:44 -0800 (PST)
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=emFqH1Rygxp/RoB7SjNdoJbu7eGrISGYRNeIExII1CphRiR1OTXp7hbJ1wd8gOQ2UMW8RkueRh2JhJrNKhR3VyRTOwlbsDCyl+x9o5EOHnKZ8CUEQjv1KjmP0ElKOU+bsQ2mtQTUygMmiyYIeGxGUmYyg9py22GmAOdoOioUV4Q= ;
 
Dear members,
 
I've created a function that reads in 10 arguments in the function call, example
 
my.fun <- function(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) {
 
...
 
}
 
I use all the arguments in the body of the function. Is there a neat way of allowing for missing arguments in the function call and not executing the code in the body of the function that refers to the missing arguments?
 
Any help is much appreciated.
 
Eric


Yahoo! Personals
Single? There's someone we'd like you to meet.
Lot's of someone's, actually. Yahoo! Personals
<Prev in Thread] Current Thread [Next in Thread>