Wanted to ask the community if the error I've come across is an error or expected behaviour.
Using count.feilds in the utils core package.
lines <- c(
"one, \"Sentence on
a few lines\"",
"'three four'")
writeLines(lines, "test.txt")
count.fields("test.txt", sep=",",quote="\"")
Expected outcome: [1] 2 1
Actual outcome: [1] NA NA 2 1
The package follows return/newlines in the define quotes, where the correct behaviour should be to ignore the characters in the quotes.
I believe this is counter intuitive and goes against other packages such as read_csv.