fileName | R Documentation |
This function takes a file path or URL and returns the base name of the file without its extension.
Unlike basename
from base R, which returns the file name with the extension, this function
directly provides just the base name, making it easier to manipulate or compare file names.
fileName(text)
text |
Character. The full path or URL of the file. |
Character. The base name of the file without the extension.
fileName("path/to/file.txt") # Returns "file" instead of "file.txt"
fileName("https://example.com/file.csv") # Returns "file" instead of "file.csv"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.