r - get extension of file without knowing the extension, no patterns -


how can extension of file? there function or tool package in r this?

for example, if have file "file.txt", how extension?. want extension without having know, can not use functions use patterns.

thank much

use file_ext

> file_ext("test.exe") [1] "exe" 

as side note, don't need separate package file i/o tasks, have in package base set of functions dealing files. are:

  1. file
  2. file.access
  3. file.exists
  4. file.info

and many many others. cool 1 basename extract file name path


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -