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:
file
file.access
file.exists
file.info
and many many others. cool 1 basename
extract file name path
Comments
Post a Comment