| get_file_ext | R Documentation | 
Extract the extension of a file.
get_file_ext(x, compression = TRUE)
x | 
 'character' vector. File path(s).  | 
compression | 
 'logical' flag. Whether to account for the compression extension '.gz', '.bz2' or '.xz'.  | 
Returns the file (name) extensions (excluding the leading dot).
J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center
c("dir/file.txt", "file.txt.gz") |>
  get_file_ext()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.