Re: [R] About choosing file
On 26.08.2010 09:50, Stephen Liu wrote: Hi folks, Following command only works on Windows Test01=read.table(file.choose(), header=TRUE) It popup open a dialog box for choosing file. But it doesn't work on Linux (Ubuntu); Test01=read.table(file.choose(), header=TRUE) Enter file name: Entering file name doesn't work. Please advise. TIA (assuming R-2.11.1) Why not? What happens? What is the error message? Which file did you specify and does list.files() lists the file? Please show the output. Best, Uwe Ligges B.R. Stephen L __ 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.
Re: [R] About choosing file
Hi Uwe, (assuming R-2.11.1) Yes Test01=read.table(file.choose(), header=TRUE) Enter file name: My problem here is ; the file is NOT on /home/user directory. I need to browse for it. list.files() [1] boxplot.pdf Desktop FourPlots01.png hist.png [5] jranke_cran.asc M-x R M-x R~ B.R. Stephen L - Original Message From: Uwe Ligges lig...@statistik.tu-dortmund.de To: Stephen Liu sati...@yahoo.com Cc: R-help@r-project.org Sent: Wed, September 15, 2010 9:20:48 PM Subject: Re: [R] About choosing file On 26.08.2010 09:50, Stephen Liu wrote: Hi folks, Following command only works on Windows Test01=read.table(file.choose(), header=TRUE) It popup open a dialog box for choosing file. But it doesn't work on Linux (Ubuntu); Test01=read.table(file.choose(), header=TRUE) Enter file name: Entering file name doesn't work. Please advise. TIA (assuming R-2.11.1) Why not? What happens? What is the error message? Which file did you specify and does list.files() lists the file? Please show the output. Best, Uwe Ligges B.R. Stephen L __ 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.
Re: [R] About choosing file
You can specify an absolute or relative path (relative to the current directory) of course. Uwe On 15.09.2010 16:03, Stephen Liu wrote: Hi Uwe, (assuming R-2.11.1) Yes Test01=read.table(file.choose(), header=TRUE) Enter file name: My problem here is ; the file is NOT on /home/user directory. I need to browse for it. list.files() [1] boxplot.pdf Desktop FourPlots01.png hist.png [5] jranke_cran.asc M-x R M-x R~ B.R. Stephen L - Original Message From: Uwe Liggeslig...@statistik.tu-dortmund.de To: Stephen Liusati...@yahoo.com Cc: R-help@r-project.org Sent: Wed, September 15, 2010 9:20:48 PM Subject: Re: [R] About choosing file On 26.08.2010 09:50, Stephen Liu wrote: Hi folks, Following command only works on Windows Test01=read.table(file.choose(), header=TRUE) It popup open a dialog box for choosing file. But it doesn't work on Linux (Ubuntu); Test01=read.table(file.choose(), header=TRUE) Enter file name: Entering file name doesn't work. Please advise. TIA (assuming R-2.11.1) Why not? What happens? What is the error message? Which file did you specify and does list.files() lists the file? Please show the output. Best, Uwe Ligges B.R. Stephen L __ 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.
Re: [R] About choosing file
You can try tcltk: library(tcltk) tk_choose.files() On Wed, Sep 15, 2010 at 11:03 AM, Stephen Liu sati...@yahoo.com wrote: Hi Uwe, (assuming R-2.11.1) Yes Test01=read.table(file.choose(), header=TRUE) Enter file name: My problem here is ; the file is NOT on /home/user directory. I need to browse for it. list.files() [1] boxplot.pdf Desktop FourPlots01.png hist.png [5] jranke_cran.asc M-x R M-x R~ B.R. Stephen L - Original Message From: Uwe Ligges lig...@statistik.tu-dortmund.de To: Stephen Liu sati...@yahoo.com Cc: R-help@r-project.org Sent: Wed, September 15, 2010 9:20:48 PM Subject: Re: [R] About choosing file On 26.08.2010 09:50, Stephen Liu wrote: Hi folks, Following command only works on Windows Test01=read.table(file.choose(), header=TRUE) It popup open a dialog box for choosing file. But it doesn't work on Linux (Ubuntu); Test01=read.table(file.choose(), header=TRUE) Enter file name: Entering file name doesn't work. Please advise. TIA (assuming R-2.11.1) Why not? What happens? What is the error message? Which file did you specify and does list.files() lists the file? Please show the output. Best, Uwe Ligges B.R. Stephen L __ 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. -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 O [[alternative HTML version deleted]] __ 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.
Re: [R] About choosing file
Hi Henrique, Thanks for your advice which works for me. B.R. Stephen L From: Henrique Dallazuanna www...@gmail.com Cc: R-help@r-project.org Sent: Wed, September 15, 2010 10:24:01 PM Subject: Re: [R] About choosing file You can try tcltk: library(tcltk) tk_choose.files() Hi Uwe, (assuming R-2.11.1) Yes Test01=read.table(file.choose(), header=TRUE) Enter file name: My problem here is ; the file is NOT on /home/user directory. I need to browse for it. list.files() [1] boxplot.pdf Desktop FourPlots01.png hist.png [5] jranke_cran.asc M-x R M-x R~ B.R. Stephen L - Original Message From: Uwe Ligges lig...@statistik.tu-dortmund.de Cc: R-help@r-project.org Sent: Wed, September 15, 2010 9:20:48 PM Subject: Re: [R] About choosing file On 26.08.2010 09:50, Stephen Liu wrote: Hi folks, Following command only works on Windows Test01=read.table(file.choose(), header=TRUE) It popup open a dialog box for choosing file. But it doesn't work on Linux (Ubuntu); Test01=read.table(file.choose(), header=TRUE) Enter file name: Entering file name doesn't work. Please advise. TIA (assuming R-2.11.1) Why not? What happens? What is the error message? Which file did you specify and does list.files() lists the file? Please show the output. Best, Uwe Ligges B.R. Stephen L __ 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. -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 O [[alternative HTML version deleted]] __ 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] About choosing file
Hi folks, Following command only works on Windows Test01=read.table(file.choose(), header=TRUE) It popup open a dialog box for choosing file. But it doesn't work on Linux (Ubuntu); Test01=read.table(file.choose(), header=TRUE) Enter file name: Entering file name doesn't work. Please advise. TIA B.R. Stephen L __ 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.