Guest User

Untitled

a guest
May 20th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. my_path <- "some/complicated/path/some_file.extension"
  2.  
  3. # no path, with extenstion
  4. # expected: "some_file.extension"
  5. basename(my_path)
  6.  
  7. # with path, no extension
  8. # expected: some/complicated/path/some_file
  9. tools::file_path_sans_ext(in_model)
  10.  
  11. # without path and extenstion
  12. ## expected: some_file
  13. basename(tools::file_path_sans_ext(my_path))
Add Comment
Please, Sign In to add comment