[R] Setting intial path under windows to MyComputer in Interactive file browser
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Feb 15 13:56:54 CET 2006
On Wed, 15 Feb 2006, Laetitia Marisa wrote:
> Hello everyone,
>
> How can I specify in tcltk file browser the initial directory to
> "MyComputer" in Windows where Drives and Partition are accessible?
That is a Tk question, not an R question. I presume you might mean via
tk_getOpenFile -initialdir ? It's a subtle one, as 'My Computer' (sic,
with a space') is not an actual directory and you need to ask elsewhere.
> And just a little question if anyone knows, is there a way to use the
> function choose.files under windows to select a directory?
Only if there is a file in the directory. Then select any file and use
dirname() on the result.
R-devel has a function choose.dir that makes this easier using the same
widget used for the 'Change dir ...' item on RGui's file menu.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list