[R] is there a formatted output in R?

Thomas Lumley tlumley at u.washington.edu
Sat Mar 11 01:54:58 CET 2006


On Fri, 10 Mar 2006, Michael wrote:

> something like "sprintf" in C?
>
> so I can do:
>
> print(sprintf("the correct result is %3.4f\n", myresult));

Did you try this line of code? It actually works in R, although you would 
probably prefer cat() instead of print().

 	-thomas

>
> -------
>
> Also, I am desperately looking for a "clear console screen"  function in
> R...
>
> thanks a lot!
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle




More information about the R-help mailing list