[R] writing functions
    graham lawrence 
    forporphyry at hotmail.com
       
    Sun May  5 20:30:30 CEST 2002
    
    
  
This is my first attempt at writing a function.  Would someone kindly 
explain its result, or non-result.  Thanking you in advance.
restore<-function(){n<-Nx}
>restore
function(){n<-Nx}
>n
[1] 408
>Nx
[1] 10
>restore()
>n
[1] 408
and, by way of variation
>restora<-function(n){n<-Nx}
>n
[1] 408
>restora
function(n){n<-Nx}
>restora()
>n
[1] 408
>restora(n)
>n
[1] 408
graham lawrence
_________________________________________________________________
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
    
    
More information about the R-help
mailing list