csv_sep.Rd
Returns the separator that consistently separates the lines in the same number of fields, or fails.
csv_sep(x)
character. File name.
Character representation of the field separator.
Tested separators are: ",", " ", "\t", "|", ";", ":"
tf <- tempfile()
td <- data.frame(T = LETTERS[1:10], N = 1:10)
write.csv(td, tf, row.names = FALSE)
csv_sep(tf) # ","
#> [1] ","
write.csv2(td, tf, row.names = FALSE)
csv_sep(tf) # ";"
#> [1] ";"