Earl F. Glynn
2005-Aug-15 21:28 UTC
[R] Anything like dir.choose (similar to file.choose) in R?
Does R have a dir.choose function? I can use file.choose like this as a kludge to get something like a dir.choose, but a real dir.choose would be better: cat("Select one of files in directory to process:\n") filename <- gsub("\\\\", "/", file.choose()) basepath <- dirname(filename) Windows provides a lower-level SHBrowseForFolder function to create such a dialog (see links below). Do other platforms have similar functionality at a lower level? (Hoping this would be an easy addition to R.) SHBrowseForFolder Function http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shbrowseforfolder.asp Using the Shell API function SHBrowseForFolder() http://community.borland.com/article/0,1410,17008,00.html efg -- Earl F. Glynn Bioinformatics Stowers Institute for Medical Research
Liaw, Andy
2005-Aug-16 00:36 UTC
[R] Anything like dir.choose (similar to file.choose) in R?
If you can use the `tcltk' package, Prof. John Fox had pointed this out to me before: dir <- tclvalue(tkchooseDirectory()) Andy> From: Earl F. Glynn > > Does R have a dir.choose function? > > I can use file.choose like this as a kludge to get something like a > dir.choose, but a real dir.choose would be better: > > cat("Select one of files in directory to process:\n") > filename <- gsub("\\\\", "/", file.choose()) > basepath <- dirname(filename) > > Windows provides a lower-level SHBrowseForFolder function to > create such a > dialog (see links below). Do other platforms have similar > functionality at > a lower level? (Hoping this would be an easy addition to R.) > > SHBrowseForFolder Function > http://msdn.microsoft.com/library/default.asp?url=/library/en- > us/shellcc/platform/shell/reference/functions/shbrowseforfolder.asp > > Using the Shell API function SHBrowseForFolder() > http://community.borland.com/article/0,1410,17008,00.html > > efg > -- > Earl F. Glynn > Bioinformatics > Stowers Institute for Medical Research > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > >
Apparently Analagous Threads
- Partek has Dunn-Sidak Multiple Test Correction. Is this the same/similar to any of R's p.adjust.methods?
- Read Windows-like .INI files into R data structure?
- Don't understand write.csv default: Why is column name for column of row names blank?
- RODBC and Excel: Wrong Data Type Assumed on Import
- french secondary boxplot