Re: [R] how to take a os.path.basename

2010-08-29 Thread Henrique Dallazuanna
Take a look on ?basename help page. On Sun, Aug 29, 2010 at 12:07 PM, Hyunchul Kim wrote: > Hi, all > > I made a simple R script to take the basename of a file without directory > names. > > path.splitted <- strsplit('/path/to/a_basename', '/') > path.length <- length(path.splitted[[1]]) > basena

[R] how to take a os.path.basename

2010-08-29 Thread Hyunchul Kim
Hi, all I made a simple R script to take the basename of a file without directory names. path.splitted <- strsplit('/path/to/a_basename', '/') path.length <- length(path.splitted[[1]]) basename <- path.splitted[[1]][path.length] # basename <- 'a_basename' Is there a simple function for this? so