fwrite中的自动引用不起作用(Windows 10,R 3.3.1,data.table 1.9.7)

时间:2016-10-27 15:57:15

标签: r data.table fwrite quote

有没有人对fwrite有同样的问题? 我使用的是Windows R 3.3.1。

login_user

1 个答案:

答案 0 :(得分:2)

quote = "auto"现已实施。请从CRAN或1.9.8+开发版本安装,不应再有任何问题。

fwrite(data.table(V1 = c("a;b", "a,b")),
       "test_fwrite2.csv", sep = ";", quote = "auto")
fread("test_fwrite2.csv", sep = ";")
#     V1
# 1: a;b
# 2: a,b
read.csv2("test_fwrite2.csv")
#    V1
# 1 a;b
# 2 a,b