Skip to contents

This function will guess the delimiter of a delimited file for a vector of filenames or filepaths and return the delimiter as a string. It defaults to the following delimiters in order if the others are not valid: ",", ";", tab, "|", ":". If the file is inaccessible or binary, it will return NA for that element. If you pass anything that is not a character vector or a single column data.frame to the filepaths argument, this function will give an error.

Usage

guess_delimiter(filepaths)

Arguments

filepaths

A character vector

Value

A character vector the same length as filepaths.