bsep {bread}R 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)

[Package bread version 0.4.1 Index]