[R] display basename

Bert Gunter gunter.berton at gene.com
Tue Nov 20 23:58:27 CET 2007


z=read.table(chosen <- file.choose(),dec=".",header=TRUE) 

will assign the return value of file.choose (the path names of the file as a
character string) to chosen.

This sort of code is seductive, but I find it quite difficult to read. I
have also gotten myself into trouble from time to time doing it sloppily.

Bert Gunter
Genentech Nonclinical Statistics


-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of mysimbaa
Sent: Tuesday, November 20, 2007 2:30 PM
To: r-help at r-project.org
Subject: [R] display basename


Hello everybody,

I'm sorry for asking a dumb question, but I don't find how to loos it.

I need to display the name of the choosing file using this command :

z=read.table(file.choose(),dec=".",header=TRUE)

Thanks for any help.
-- 
View this message in context:
http://www.nabble.com/display-basename-tf4846650.html#a13866718
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list