bsep: Tries to identify the separator / delimiter used in a table...

View source: R/bsep.R

bsepR Documentation

Tries to identify the separator / delimiter used in a table format file

Description

The function reads the first row and tests the following common separators by default: ';' '\t' ' ' '|' ':' ','

Usage

bsep(file, ntries = 10, separators = c(";", "\t", " ", "|", ":", ","))

Arguments

file

String. Name or full path to a file compatible with data.table::fread()

ntries

Numeric. Number of rows to check for

separators

Vector of strings. Additional uncommon delimiter to check for

Value

A string

Examples

file <- system.file('extdata', 'test.csv', package = 'bread')
## Checking the delimiter on the first 12 rows, including headers
bsep(file = file, ntries = 12)

MagicHead99/bread documentation built on July 7, 2023, 5:53 p.m.