I'm encountering an issue with the elevatr::get_elev_raster function in R, specifically receiving a 'Please connect to the internet', despite having a functional internet connection as confirmed by successfully using download.file.
The code I am running is
library(elevatr)
library(sf)
data(lake)
lake_buff <- st_buffer(lake, 1000)
loc_df <- data.frame(x = runif(6,min=sf::st_bbox(lake)$xmin,
max=sf::st_bbox(lake)$xmax),
y = runif(6,min=sf::st_bbox(lake)$ymin,
max=sf::st_bbox(lake)$ymax))
x <- get_elev_raster(locations = loc_df, prj = st_crs(lake) , z=10)
x <- get_elev_raster(lake, z = 12)
x <- get_elev_raster(lake, src = "gl3", expand = 5000)
x <- get_elev_raster(lake_buff, z = 10, clip = "locations")
I've tried updating the elevatr package and checked my firewall settings, but the issue persists. The exact error message is: 'Please connect to the internet and try again.' I am looking for guidance on why this error is occurring and any potential solutions. My session information, as obtained by sessionInfo(), is included.