[R] display basename

Bert Gunter gunter.berton at gene.com
Wed Nov 21 01:34:26 CET 2007


Of course. I was just putting it inline to be as minimalist as possible...
I'm in a minimal mood today...

-- Bert 


Bert Gunter
Nonclinical Statistics
7-7374

-----Original Message-----
From: henrik.bengtsson at gmail.com [mailto:henrik.bengtsson at gmail.com] On
Behalf Of Henrik Bengtsson
Sent: Tuesday, November 20, 2007 3:25 PM
To: Bert Gunter
Cc: mysimbaa; r-help at r-project.org
Subject: Re: [R] display basename

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 <gunter.berton at gene.com> 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: 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.
>
> ______________________________________________
> 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