.splitByTab {ngsReports} | R Documentation |
Split elements of a character vector by the tab separator
.splitByTab(x, firstRowToNames = TRUE, tab = "\\t")
x |
A character vector |
firstRowToNames |
logical Should the first element be used for column names |
tab |
character The string used torepresent the tab symbol |
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()'
A data frame
x <- c("ColA\tColB", "Value1\tValue2") ngsReports:::.splitByTab(x, firstRowToNames = TRUE) ngsReports:::.splitByTab(x, firstRowToNames = FALSE)