guess_delimiter: Guess the delimiter of a delimited file for a vector of...

View source: R/guess_delimiter.R

guess_delimiterR Documentation

Guess the delimiter of a delimited file for a vector of filenames or filepaths

Description

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 primarily uses vroom:::guess_delim() to guess, and defaults to "," if that fails. 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.


2DegreesInvesting/PACTA_analysis documentation built on April 19, 2023, 6:42 p.m.