I do not understand what your question is. Can you clarify with an
example or analogies to other programming language.

 my.fun <- function(x, y=1){ x^y }

 my.fun(5)        # returns 5 
 my.fun(5, 2)     # returns 25
 my.fun(y=2, x=5) # returns 25

Regards, Adai


On Sun, 2005-11-06 at 03:28 +0000, Xiaofan Li wrote:
> Hello guys,
> 
> I am wondering the default way of transferring arguments in R. Is it by
> value or by ref in default case, or could that be changed explicitly?
> 
> Cheers,
> Xiaofan
> 
> ---
> Xiaofan Li
> Department of Applied Mathematics and Theoretical Physics
> University of Cambridge
> 
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 
-- 
Adaikalavan Ramasamy                    [EMAIL PROTECTED]
Centre for Statistics in Medicine       http://www.ihs.ox.ac.uk/csm/
Wolfson College Annexe                  Tel : 01865 284 408
Linton Road, Oxford OX2 6UD             Fax : 01865 284 424

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to