Description Usage Arguments Value Note Examples
Check whether file extension is as specified
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | is_txt_file(x)
is_csv_file(x)
is_excel_file(x)
is_r_file(x)
is_rdata_file(x)
is_rda_file(x)
is_rds_file(x)
is_spss_file(x)
check_ext_against(x, ext = "txt")
|
x |
file(s) to be tested |
ext |
extension to test against |
a logical value
These only check the file extension and not the contents of the file. Checking
the contents of a file might come later but would be quite a bit more involved.
You can use readr
or readxl
(for example) to check the file contents.
1 2 3 4 5 | # create your own file extension checks
is_word_file <- function(x){
check_ext_against(x, ext = c("doc", "docx"))
}
is_word_file(c("blah.doc", "blah.docx", "blah.txt"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.