Revision 9e5b9bb8a0564f8bf629df4ca5e96d3078f50363 authored by jmc on 14 July 2008, 00:00:00 UTC, committed by Gabor Csardi on 14 July 2008, 00:00:00 UTC
1 parent a3b36b1
Raw File
localRFiles.R
localRFiles <- function(directory = getwd(), suffix = "[.][RSq]$", ask = FALSE) {
    files <- list.files(directory)
    which <- grep(suffix, files)
    if(ask) {
        files <- files[which]
        which <- menu(c(files, "Other?"), graphics = TRUE)
        if(which > length(files)) {
            message("Enter a file name:")
            return(scan(stdin(), "",n=1))
        }
    }
    files[which]
}

    
    
    
back to top