[Rd] Question about Unix file paths

Duncan Murdoch dmurdoch at pair.com
Thu Nov 27 17:45:45 MET 2003

On Thu, 27 Nov 2003 09:39:16 -0500 (EST), "Gabor Grothendieck"
<ggrothendieck at myway.com> wrote :

>> I don't think we should add another pattern matching syntax to R.
>> Filename pattern matching is a job for the shell or the OS.
>> Duncan Murdoch
>Its not done by the shell in Windows, VAX/VMS
>and probably a number of other systems.  

In Windows it's an OS function, through the FindFirstFile and
FindNextFile API functions.  This has the advantage that wildcards
behave the same in all programs, and the disadvantage of a lack of

In R choose.files() uses this facility indirectly, in that it goes
through the shell file dialog functions.  We could make it go directly
to the API functions, but I don't see it as a high priority:
list.files() works fine in programs (and is portable across OS's and
shells), and choose.files() is fine for interactive use.

The only thing I'd suggest is that Unix systems should have their own
choose.files() function, designed to use whatever interactive file
selection mechanism is native to their own platform.

Duncan Murdoch

More information about the R-devel mailing list