Try this also: substr(basename(myfile), 1, nchar(basename(myfile)) - 4)
On Fri, Jan 9, 2009 at 12:10 AM, Gundala Viswanath <gunda...@gmail.com>wrote: > 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 > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.