[R] utilize the R to write something on txt file

Dieter Menne dieter.menne at menne-biomed.de
Fri Oct 24 08:10:53 CEST 2008


Abelian <abelian1982 <at> gmail.com> writes:

 
> i have to utilize the R to report the simulation result by txt file.
> However, i have to write some introduction and explanination before
> the result.
> by the way,, there are variables follow with "Input directory name:"
> "Output directory name:", "The number of study groups:" etc

FINAL = TRUE
if (FINAL) sink("mydoc.txt") 

age = 33
cat("I am", age, "years old\n")

if (FINAL) sink()


But if you have more to say, better check Sweave/latex or odfWeave.

Dieter



More information about the R-help mailing list