So why not suggest pathname <- file.choose() z <- read.table(pathname, dec=".", header=TRUE)
instead. /Henrik On Nov 20, 2007 2:58 PM, Bert Gunter <[EMAIL PROTECTED]> wrote: > 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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of mysimbaa > Sent: Tuesday, November 20, 2007 2:30 PM > To: r-help@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@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. > > ______________________________________________ > R-help@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. > ______________________________________________ R-help@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.