Skip to content

Setting intial path under windows to MyComputer in Interactive file browser

3 messages · Laetitia Marisa, Brian Ripley, Gabor Grothendieck

#
Hello everyone,

How can I specify in tcltk file browser the initial directory to 
"MyComputer" in Windows where Drives and Partition are accessible?

And just a little question if anyone knows, is there a way to use the 
function choose.files under windows to select a directory?

Thanks a lot for your help.

Laetitia.
#
On Wed, 15 Feb 2006, Laetitia Marisa wrote:

            
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.
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.
#
On 2/15/06, Laetitia Marisa <Laetitia.Marisa at cgm.cnrs-gif.fr> wrote:
Use:

   tkchooseDirectory()