Description Usage Arguments Value Author(s) See Also Examples
Gets the base and the extension of a filename, i.e. the character strings
before and after the last period ('.') in the filename. If no base
(extension) exists, it take the value ""
.
Note, here base means a different thing from what is meant in the
function basename
().
1 2 | ## Default S3 method:
baseAndExtension(filename, ...)
|
filename |
A filename. |
... |
Not used. |
Returns a vector
of two character
strings; the base and the extension.
Henrik Bengtsson
basename
() (includes dirname()
).
1 2 3 | baseAndExtension("/usr/local/bin/foo.sh") # "/usr/local/bin/foo" "sh"
baseAndExtension("/usr/local/bin/foo...") # "/usr/local/bin/foo.." ""
baseAndExtension("/usr/local/bin/") # "/usr/local/bin/" ""
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.