powered by
This function hard codes some of the common extensions that we deal with.
remove_extension(fname)
A character string, with the extension removed.
A character string of the filename, with the extension present.
If none of the known extensions knit.md, utf8.md, R or Rmd are found, then the last period onwards are removed. See the examples.
If no extensions are found, the original filename is returned.
remove_extension("test.Rmd") remove_extension("test.knit.md") remove_extension("test.r.txt") remove_extension("test_no_extension")
Run the code above in your browser using DataLab