0

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.

Ester Silva
  • 670
  • 6
  • 24

1 Answers1

0

sep can only be one character, but you can open your file x e.g. with readLines and exchange your "," separator e.g. with \t by using gsub.

read.table(text=gsub("\",\"", "\t", readLines("x")))
GKi
  • 37,245
  • 2
  • 26
  • 48