Reputation: 4239
I have a csv file in which some columns have double quotes in them. I want to remove all these double quotes in R before I apply read.csv() on this file to store the data in a data frame.
Upvotes: 3
Views: 4983
Reputation: 55420
f <- "path/to/file.csv"
raw <- readLines(f)
raw <- gsub("\\\"\\\"", "\"", raw)
DAT <- read.table(text=raw)
updated to reflect Hugh's clarification below
Upvotes: 1