[R] sink() and command files
Malerba Giovanni
bobo at medgen.univr.it
Tue Mar 13 16:44:03 CET 2001
Dear all,
if I type from the R command line the following:
ped <- read.table("R.ped", header=TRUE, sep=";",na.strings="x")
p <- glm(formula=Dust.mites ~ Graminacee+IgE.num+geneA,ped,family=binomial(logit))
sink (file="r.output")
summary(p)
sink()
everything works fine and 'r.output' is generated.
BUT , if I write (with an editor) the same lines into a command-file (i.e.
r.bat) and from the R command line I type: source("r.bat")
the r.output is generated but it is empty.
What should I do to write a command-file that is able to re-direct the R
output to a file?
Many thanks,
Giovanni Malerba
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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