[R] Prompt comes too late

2007-07-30 Thread Ralf Finne
Hi R fans I am trying to make a program to ask the user to choose data file: print("Choose data file please !") matr=read.table(file.choose(),dec=".",header=TRUE) The problem is that the prompt Choose data file please ! comes after I have chosen the file. What am doing wrong? Thanks in a

Re: [R] Prompt comes too late

2007-07-30 Thread Prof Brian Ripley
Using print() for a 'prompt' is rather unusual: people normally use message() or cat(). You haven't told us your OS, but if this is Windows, see rw-FAQ Q7.1. On Sun, 29 Jul 2007, Ralf Finne wrote: > Hi R fans > > I am trying to make a program to ask the user to choose data file: > > print("Cho

Re: [R] Prompt comes too late

2007-07-31 Thread Vladimir Eremeev
You can use choose.files(caption="Choose data file please!",multi=FALSE,filters=Filters["All"]) This will show the prompt in the file selection dialog and also allows you to restrict the list of possible choises with a filter. Ralf Finne wrote: > > I am trying to make a program to ask the use