[R] print(), paste()
Ott Toomet
siim at obs.ee
Tue Sep 24 15:55:59 CEST 2002
On Tue, 24 Sep 2002, Dirk Eddelbuettel wrote:
|On Tue, Sep 24, 2002 at 11:34:05PM +1200, Ko-Kang Kevin Wang wrote:
...
|You want cat() instead of print(), and sprintf() is one way to get finer
|control over how things are printed:
|
|> answer <- c(2,1,0,4,5)
|> print(answer); cat(sprintf("The best fit is with %.0f-degree polynomial\n",
| which.min(answer)-1))
|[1] 2 1 0 4 5
|The best fit is with 2-degree polynomial
Or just use cat(..., sep="")
cat("The best...", which.min(abwer)-1, sep="")
Ott
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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