Skip to content
Prev 326891 / 398502 Next

file.stem?

Hello,

You can use ?basename to write a file.stem function:


basename("/the/path/to/afile.txt")

file.stem <- function(x){
	bn <- basename(x)
	gsub("\\..*$", "", bn)
}
file.stem("/the/path/to/afile.txt")



Hope this helps,

Rui Barradas

Em 15-07-2013 15:23, Witold E Wolski escreveu: