csv - R fwrite separates a dataframe entry that has commas -


i thinking of using fwrite development version of data.table write large dataframes csv files fast. however, seems separate whatever goes after comma separate column (not desired) while write.csv not (as desired). here example.

# install data.table 1.9.7 remove.packages("data.table")                         # first remove current version install.packages("data.table", type = "source",     repos = "http://rdatatable.github.io/data.table") # install devel version  library(data.table) x <- c('a1, b1, c1', 'a2, b2, c2') y <- c(1, 2) df <- data.frame(x, y) fwrite(df, 'fwrite.csv') write.csv(df, 'write.csv') 

if @ file written fwrite, see b's , c's separated separate columns (not desired) while not happen in file written write.csv (as desired). know how fwrite not that? thank you.


Comments