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
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
2 matches
Mail list logo