getGEOSuppFiles now checks if the files were already downloaded. Happens inside the loop so checks for each file separately - if the dataset has more than one supplementary file.
result <- tryCatch({
if (!file.exists(destfile)) {
res <- download.file(paste(file.path(url, i), "tool=geoquery", sep = "?"), destfile = destfile, mode = "wb", method = getOption("download.file.method.GEOquery"))
## download.file returns a '0' on success
} else {
message(sprintf("Using locally cached version of supplementary file(s) %s found here:\n%s ",
GEO, destfile))
res <- 0
}
res == 0
}, error = function(e) return(FALSE), warning = function(w) return(FALSE))
getGEOSuppFiles
now checks if the files were already downloaded. Happens inside the loop so checks for each file separately - if the dataset has more than one supplementary file.