I installed nhdR this morning and found that nhd_get() was failing to unzip the download with the following error:
Downloading https://prd-tnm.s3.amazonaws.com/StagedProducts/Hydrography/NHD/State/HighResolution/GDB/NHD_H_Minnesota_State_GDB.zip Error in curl::curl_fetch_disk(url, x$path, handle = handle) : Failed to open file C:\Users\jpshanno\AppData\Local\nhdR\nhdR\NHD_H_Minnesota_State_GDB.zip.
After tracing the problem back I found that nhd_path() was failing to create the app directory, so the download was failing as the destination directory didn't exist. Setting recursive = TRUE in dir.create() inside of nhd_path() should fix the problem.
I installed nhdR this morning and found that nhd_get() was failing to unzip the download with the following error:
Downloading https://prd-tnm.s3.amazonaws.com/StagedProducts/Hydrography/NHD/State/HighResolution/GDB/NHD_H_Minnesota_State_GDB.zip Error in curl::curl_fetch_disk(url, x$path, handle = handle) : Failed to open file C:\Users\jpshanno\AppData\Local\nhdR\nhdR\NHD_H_Minnesota_State_GDB.zip.
After tracing the problem back I found that
nhd_path()
was failing to create the app directory, so the download was failing as the destination directory didn't exist. Settingrecursive = TRUE
indir.create()
inside ofnhd_path()
should fix the problem.