Determine the Delimiter of a File
determine_delimiter.Rd
This function attempts to determine the delimiter of a file by inspecting the first few lines. It checks for the presence of commas or semicolons. However, this method may not always be accurate, especially if the data itself contains these characters or if the file uses a different delimiter.
Value
A character string indicating the delimiter used in the file. Returns "," if commas are detected, ";" if semicolons are detected, and stops with an error message if neither is detected.
Note
This method is not foolproof and may not accurately determine the delimiter for all files, especially if the delimiter is not consistently used or if the data contains the delimiter characters. This function is intended for text files containing delimited data and is not suitable for binary data files