50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

campfin (version 1.0.7)

guess_delim: Guess the delimiter of a text file

Description

Taken from code used in vroom::vroom() with automatic reading.

Usage

guess_delim(file, delims = c(",", "\t", " ", "|", ":", ";"))

Arguments

file

Either a path to a file or character string (with at least one newline character).

delims

The single characters to guess from.

Value

The single character guessed as a delimiter.

Examples

Run this code
# NOT RUN {
guess_delim(system.file("extdata", "vt_contribs.csv", package = "campfin"))
guess_delim("
a|b|c
1|2|3
")
# }

Run the code above in your browser using DataLab