murdoch@dunc@n @end|ng |rom gm@||@com
Tue Mar 3 17:26:07 CET 2020
On 03/03/2020 10:47 a.m., Ivan Calandra wrote:
> That's what I was about to answer but tried first and it did not work.
> Now I tried more and noticed an unexpected behavior:
>  "C:/Users/.../Documents"
> file.choose() ## opens in "C:/Users/.../Documents" as expected
>  "D:/"
> file.choose() ## unexpectedly, opens in "C:/Users/.../Documents"
>  "D:/Data"
> file.choose() ## opens in "D:/Data" as expected
> Is that normal behavior?
If I recall correctly, the Windows GUI version opens the same directory
as the user last selected (i.e. the dialog box remembers the last
selection). This was by design, because Windows users often start the
GUI with the working directory being the R home directory, and rarely
use setwd() to change it.
On Windows, I think you always get that version. On other platforms it
may depend on which front end you're using.
More information about the R-help