tsv_is_empty | R Documentation |
Checks if the TSV file contains any non-header rows.
tsv_is_empty(
x,
comment = "##",
col_types = readr::cols(.default = "c"),
n_max = 1,
...
)
x |
Path to TSV file. |
comment |
Taken from |
col_types |
Taken from |
n_max |
Taken from |
... |
Other arguments to be passed to |
TRUE if there is at least one non-header row in the TSV, FALSE otherwise.
tmp1 <- tempfile()
writeLines(c("col1\tcol2\tcol3", "1\t2\t3"), con = tmp1)
(a <- tsv_is_empty(tmp1))
tmp2 <- tempfile()
writeLines(c("col1\tcol2\tcol3"), con = tmp2)
(b <- tsv_is_empty(tmp2))
tmp3 <- tempfile()
writeLines(c("##meta1", "##meta2", "col1\tcol2\tcol3"), con = tmp3)
(c <- tsv_is_empty(tmp3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.