Description Usage Arguments Value Note Author(s) Examples
Rather than just checking the file extension, this function checks whether the contents of the file contain tabs. The file paths must exist, they must be ASCII test, and must have at least one tab in one of the lines to qualify.
1 | is.tsv.file(path)
|
path |
a character vector: the path(s) to file(s) which must exist |
a logical vector of length(path), where
the values are TRUE
if the path is an excel file, FALSE
otherwise.
We could make this more stringent by requiring that all lines contain the same number of tabs, but need to consider how to skip header lines, and column name lines which can contain NCOL-1 columns (if written using write.table)
Mark Cowley, 2012-02-01
1 2 3 4 5 6 7 | ## Not run:
is.tsv.file("./tmp.xls")
is.tsv.file("./tmp.tsv")
is.tsv.file("./tmp.csv")
is.tsv.file(c("./tmp.xls", "./tmp.tsv", "./tmp.csv"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.