fraenzi / birdring

R functions for analysing EURING ring recovery and recapture data
0 stars 1 forks source link

reading apostrophs #2

Open fraenzi opened 6 years ago

fraenzi commented 6 years ago

Apostrophes produce errors while reading in data. Rob found a solution, that needs to be implemented.

mail of Rob 26. January 2018 The answer is here: https://stackoverflow.com/questions/9620155/how-to-read-a-csv-file-containing-apostrophes-into-r

Apparently read.table (and others) have a quote argument which defaults to quote = " \" ' " # I have added spaces for clarity

There are two solutions: quote = "\"" or quote = "" # or quote = NULL The first accepts just the double-quote (") as the start of a string, the second accepts no quoted strings, which might be safer?

Also it has the argument comment.char="#" which indicates a comment. I am not sure anyone is likely to use this symbol, but maybe adding comment.char = "" to the read.table command would also be safe?