How to define ","
as the column separator (sep
) in read.csv
in R?
I have tried read.csv(file=x,header = FALSE,sep = "","")
, which doest work correctly.
Asked
Active
Viewed 1,851 times
0

Ester Silva
- 670
- 6
- 24
-
1The default separator in `read.csv` is already comma. So, just omit the `sep=","` part and it should work. – Tim Biegeleisen May 28 '19 at 16:31
-
@TimBiegeleisen, I have the double quotation as well that I want to use as the seperator. – Ester Silva May 28 '19 at 16:32
-
You may have to parse the file manually then, [see here](https://stackoverflow.com/questions/18186357/importing-csv-file-with-multiple-character-separator-to-r). – Tim Biegeleisen May 28 '19 at 16:34
-
You probably want to set both the quotes and sep option then. Do the individual lines begin/end with `"`s? – Neal Fultz May 28 '19 at 17:31