[R] Isolating string containing only file name from complete path

From: Ken Termiso <jerk_alert_at_hotmail.com>
Date: Tue 12 Jul 2005 - 02:13:58 EST


Hi all,

What I'd like to do is to is to be able to extract a string corresponding to only the file name from a string containing the complete path, i.e. from the following path string:

"/Users/ken/Desktop/test/runs/file1"

I would like to end up with:

"file1"

This would be most ideally done in a platform-independent way.

Thanks in advance,
-Ken



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Jul 12 02:19:23 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:28 EST