LoginSignup
4
4

More than 5 years have passed since last update.

R で 1000 を 1,000 みたいに区切り文字を入れたい #rstatsj

Posted at

prettyNum を使うと便利。

コード
x <- 1:10 * 1000000
prettyNum(x, big.mark=",", big.interval=3, scientific=FALSE)
結果
 [1] " 1,000,000" " 2,000,000" " 3,000,000" " 4,000,000" " 5,000,000"
 [6] " 6,000,000" " 7,000,000" " 8,000,000" " 9,000,000" "10,000,000"

参考: http://stat.ethz.ch/R-manual/R-devel/library/base/html/formatc.html

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4