Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.64.0602151235420.23306@gannet.stats.ox.ac.uk>
Date: 2006-02-15T12:56:54Z
From: Brian Ripley
Subject: Setting intial path under windows to MyComputer in Interactive file browser
In-Reply-To: <43F30087.9080903@cgm.cnrs-gif.fr>

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