[R] Anything like dir.choose (similar to file.choose) in R?

From: Earl F. Glynn <efg_at_stowers-institute.org>
Date: Tue 16 Aug 2005 - 07:28:10 EST


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@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
Received on Tue Aug 16 07:42:30 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:49 EST