LoginSignup
1
3

More than 5 years have passed since last update.

write.csv と write.csv2 の違い

Posted at

自分用のメモがてら、初めてQiitaで記事を書いてみようと思いました。

違いは区切り文字がカンマ(,)かセミコロン(;)の違い。

区切り文字
write.csv() カンマ(,)
write.csv2() セミコロン(;)

例えば、

> a
     [,1] [,2] [,3] [,4]
[1,]    1    4    7   10
[2,]    2    5    8   11
[3,]    3    6    9   12

この行列を

> write.csv(a,"a.csv")
> write.csv2(a,"a2.csv")

とすると、こう出力される。

  • write.csv()
    a.png

  • write.csv2()
    a2.png

参考になれば幸いです。

1
3
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
1
3