[R] A shorter version of ".Last.value"?

Peter Dalgaard p.dalgaard at biostat.ku.dk
Mon Jul 7 20:29:32 CEST 2008


Gabor Grothendieck wrote:
> Try this:
>
>   
>> makeActiveBinding("ans", function() .Last.value, .GlobalEnv)
>>     
> NULL
>   
>> yy <- 3
>> ans
>>     
> [1] 3
>
>   
OK, you win.

AND Luke won't kill you because he wrote that stuff...

-- 
   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



More information about the R-help mailing list