Closed spsanderson closed 1 year ago
Yes, I can. I think the error is due to the directory path extract_location
not existing. Do you think we should make it an argument? A temporary directory is not a bad place to put this. I'll sketch it out and you can let me know what you think/
I also think we should add a ...
to unzip()
so you can do unzip(list = TRUE)
or unzip(files = "ASC_Facility.csv")
and get just the files you need.
current_hosp_data <- function(path = tempdir(), ...) {
utils::unzip(download_location, ...)
}
Thanks for taking a look at this. I think we could make an argument to allow someone to pull a file out, they would just need to know the name or we would need to implement some grep() to it, which is similar to what I do with other functions like current_asc_data() seen here: https://github.com/spsanderson/healthyR.data/blob/HEAD/R/get-cur-asc-data.R
On Tue, May 9, 2023 at 10:14 AM Jake @.***> wrote:
Yes, I can. I think the error is due to the directory path extract_location not existing. Do you think we should make it an argument? A temporary directory is not a bad place to put this. I'll sketch it out and you can let me know what you think/
I also think we should add a ... to unzip() so you can do unzip(list = TRUE) or unzip(files = "ASC_Facility.csv") and get just the files you need.
current_hosp_data <- function(path = tempdir(), ...) { utils::unzip(download_location, ...) }
— Reply to this email directly, view it on GitHub https://github.com/spsanderson/healthyR.data/issues/72#issuecomment-1540211954, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPCNS4J76GE4IZAOVUFQ43XFJGKTANCNFSM6AAAAAAX26TNH4 . You are receiving this because you authored the thread.Message ID: @.***>
-- Steven P Sanderson II, MPH Book on Lulu http://goo.gl/lmrlFI Personal Site http://www.spsanderson.com
instead of using 'tempdir()` use utils::choose.dir() intead.
New function:
@rjake would you have the bandwidth to confirm this one?