Skip to content
Back to formatted view

Raw Message

Message-ID: <x2y857f6nc.fsf@turmalin.kubism.ku.dk>
Date: 2005-10-06T07:26:15Z
From: Peter Dalgaard
Subject: Changing the value of variables passed to functions as arguments
In-Reply-To: <p0623091cbf6a3eb01a36@[192.168.1.102]>

Paul Baer <baer at 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 at biostat.ku.dk)                  FAX: (+45) 35327907