[R] Writing a workable function
Charles RAUX
Charles.Raux at let.ish-lyon.cnrs.fr
Mon Aug 14 12:25:35 CEST 2000
After searching in R- Introduction, FAQ, help... I don't understand
this:
I write a function in a file (.R):
tt <- function(mc) { date()
mc<-read.csv2("machines.txt",na.strings="")
date()
}
I source it in R and I type tt(). The answer is
> tt()
[1] "Mon Aug 14 11:18:25 2000"
>
The instructions following the first "date()" are ignored. Why?
---------------
Charles RAUX,
Laboratoire d'Economie des Transports
CNRS-Université Lumière Lyon 2-ENTPE
email : charles.raux at let.ish-lyon.cnrs.fr
http://www.ish-lyon.cnrs.fr/let
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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