[R] Thousand separator in format of axis

Richard M. Heiberger rmh at temple.edu
Mon Sep 18 00:12:34 CEST 2006


> format(10000, big.mark=" ")
[1] "10 000"
> format(seq(10000,100000,10000), big.mark=" ", scientific=FALSE)
 [1] " 10 000" " 20 000" " 30 000" " 40 000" " 50 000" " 60 000" " 70 000"
 [8] " 80 000" " 90 000" "100 000"

> plot(seq(10000, 100000, 10000), yaxt="n")
> axis(2, at=seq(10000, 100000, 10000), labels=format(seq(10000,100000,10000),
+       big.mark=" ", scientific=FALSE))



More information about the R-help mailing list