[R] Extracting File Basename without Extension

Gundala Viswanath gundalav at gmail.com
Fri Jan 9 03:10:41 CET 2009


Dear all,

The basename() function returns the extension also:

> myfile <- "path1/path2/myoutput.txt"
> basename(myfile)
[1] "myoutput.txt"


Is there any other function where it just returns
plain base:

"myoutput"

i.e. without 'txt'

- Gundala Viswanath
Jakarta - Indonesia




More information about the R-help mailing list