Skip to content
Prev 86496 / 398506 Next

Setting intial path under windows to MyComputer in Interactive file browser

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.