walkerke / tigris

Download and use Census TIGER/Line shapefiles in R
Other
324 stars 45 forks source link

test on file path for tigris_cache_dir #176

Open defuneste opened 1 year ago

defuneste commented 1 year ago

Just added a if stop() in tigris_cache_dir() to check if the user input a correct path before writing it in .Renviron.

This line: https://github.com/walkerke/tigris/blob/0f0d7992e0208b4c55a9fe8ac6c52f9e438a3b0c/R/helpers.R#L81 probably managed to avoid all the ~/somepath type of errors but I feel it is safer to stop the user before https://github.com/walkerke/tigris/blob/0f0d7992e0208b4c55a9fe8ac6c52f9e438a3b0c/R/helpers.R#L86 create a "weird path".