extract_file_extension | R Documentation |
This function parses each input URL or path and extracts the file extension, if present. It is particularly useful for identifying the type of files referenced in URLs.
extract_file_extension(url)
url |
A character vector of URLs or paths from which to extract file extensions. |
A character vector with the file extension for each URL or path.
Extensions are returned without the dot (e.g., "jpg" instead of ".jpg"),
and URLs or paths without extensions will return NA
.
extract_file_extension(
c(
"http://example.com/image.jpg",
"https://example.com/archive.zip",
"http://example.com/"
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.