.splitByTab {ngsReports} | R Documentation

## Split elements of a vector into a data.frame

### Description

Split elements of a character vector by the tab separator

### Usage

    .splitByTab(x, firstRowToNames = TRUE, tab = "\\t")

### Arguments

`x` | A character vector
`firstRowToNames` | logical Should the first element be used for column names
`tab` | character The string used torepresent the tab symbol

### Details

This will split a vector into a data.frame checking that every line has the same number of separators. By default the first element will be set as the column names.

This is designed to take input from `readLines()`

### Value

A data frame

### Examples

    x <- c("ColA\tColB", "Value1\tValue2")
    ngsReports:::.splitByTab(x, firstRowToNames = TRUE)
    ngsReports:::.splitByTab(x, firstRowToNames = FALSE)

[Package ngsReports version 1.8.1 Index]