Re: [R] Changing the value of variables passed to functions as arguments

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Thu 06 Oct 2005 - 17:26:15 EST

Paul Baer <baer@stanford.edu> writes:

> Is it possible to write functions in such a way that, rather than
> having to write "a=function(a)", one can just write "function(a)" and
> have the variable passed as the argument be modified?
>
> My real interest here is being able to invoke the editor by writing
> "ed(filename)" rather than filename=edit(filename).

You might want to check out fix()...

-- 
   O__  ---- Peter Dalgaard             ุster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)                  FAX: (+45) 35327907

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Oct 06 17:40:09 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 18:24:03 EST