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 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.
>
--
View this message in context:
http://www.nabble.com/Prompt-comes-too-late-tf4178913.html#a11919327
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
[email protected] 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.