I have a txt file like:
"cd_solicitud""nu_cuit""cd_provincia""tx_provincia"
"9531""203128827"18"Salta"
"9541""272477419"9"Entre Ríos"
"9571""273065780"2"Buenos Aires"
"6331""233703594"7"Córdoba"
"6351""272442465"5"Chaco"
I am trying to read it with:
prov_nos<-read.table("C:/.../prov_demo.txt",
header=T, quote = "\"")
But I get the following error:
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : line 1 doesn't have 4 elements
readLinesand then manually process each row, splitting on"\""or something and removing entries of zero length. Then stitch it all back together withdo.call(rbind,...). - joran