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

2005-07-11 Thread Sebastian Luque
Ken Termiso [EMAIL PROTECTED] wrote:
 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


?basename

-- 
Sebastian P. Luque

__
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


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

2005-07-11 Thread Adaikalavan Ramasamy
x - /Users/ken/Desktop/test/runs/file1.txt
basename(x)
[1] file1.txt



On Mon, 2005-07-11 at 16:13 +, Ken Termiso wrote:
 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


__
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