Dear users, I am looking for a function to choose a folder interactively, just like file.choose() but for a folder. I have found tcltk::tk_choose.dir() but R hangs when I try to do anything and I have to force exit. I've tried to reinstall tcltk with install.packages(), but "package ?tcltk? is not available (for R version 2.15.2)" even though it's already installed on my computer (it comes with 'base', doesn't it?). From a Google Search, I have also found choose.dir(), but it looks like this function doesn't exist anymore since ages. Any idea? Thanks in advance, Ivan sessionInfo() R version 2.15.2 (2012-10-26) Platform: i386-apple-darwin9.8.0/i386 (32-bit) locale: [1] fr_FR.UTF-8/fr_FR.UTF-8/fr_FR.UTF-8/C/fr_FR.UTF-8/fr_FR.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base -- Ivan CALANDRA Universit? de Bourgogne UMR CNRS/uB 6282 Biog?osciences 6 Boulevard Gabriel 21000 Dijon, FRANCE +33(0)3.80.39.63.06 ivan.calandra at u-bourgogne.fr http://biogeosciences.u-bourgogne.fr/calandra
On 12-11-28 7:39 AM, Ivan Calandra wrote:> Dear users, > > I am looking for a function to choose a folder interactively, just like > file.choose() but for a folder. > > I have found tcltk::tk_choose.dir() but R hangs when I try to do > anything and I have to force exit. > I've tried to reinstall tcltk with install.packages(), but "package > ?tcltk? is not available (for R version 2.15.2)" even though it's > already installed on my computer (it comes with 'base', doesn't it?). > > From a Google Search, I have also found choose.dir(), but it looks like > this function doesn't exist anymore since ages. > > Any idea?"choose.dir()" does exist on Windows, so you could switch to that OS, or write your own equivalent for MacOS. Duncan Murdoch
On Wed, Nov 28, 2012 at 12:47 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:> On 12-11-28 7:39 AM, Ivan Calandra wrote: >> >> Dear users, >> >> I am looking for a function to choose a folder interactively, just like >> file.choose() but for a folder. >> > "choose.dir()" does exist on Windows, so you could switch to that OS, or > write your own equivalent for MacOS.Is this the sort of thing for which a patch to the Mac-specific code would be welcomed/of some interest by R-Core or are their good reasons this doesn't already exist? Michael