Running examples in ‘RavenR-Ex.R’ failed
The error most likely occurred in:

> ### Name: rvn_gen_gridweights
> ### Title: Generate Raven grid weights from shapefile
> ### Aliases: rvn_gen_gridweights
> 
> ### ** Examples
> 
> 
> # load example rvh file
> nith <- system.file("extdata",'Nith.rvh', package = "RavenR")
> rvh <- rvn_rvh_read(nith)
> 
> # adjust HRU shapefile to one per subbasin for demonstration
> rvh$HRUtable <- rvh$HRUtable[c(1,6,15,25),]
> rvh$HRUtable$Area <- rvh$SBtable$Area
> rvh$HRUtable$ID <- rvh$HRUtable$SBID
> 
> # define HRU shapefile (use subbasin shapefile for example)
> HRUshpfile <- system.file("extdata","Nith_shapefile_sample.shp",package = "RavenR")
> 
> # write grid shapefile from netcdf file
> nithnc <- system.file("extdata/Nith_era5_sample.nc", package="RavenR")
> Gridshpfile <- file.path(tempdir(), "Nith_gridcells.shp")
> myshp <- rvn_netcdf_to_gridshp(ncfile=nithnc, projID=26917, outshp=Gridshpfile)
Warning in CPL_write_ogr(obj, dsn, layer, driver, as.character(dataset_options),  :
  GDAL Error 1: /Volumes/Temp/tmp/Rtmpah4RXz/Nith_gridcells.shp does not appear to be a file or directory.
Deleting source `/Volumes/Temp/tmp/Rtmpah4RXz/Nith_gridcells.shp' failed
Writing layer `Nith_gridcells' to data source `/Volumes/Temp/tmp/Rtmpah4RXz/Nith_gridcells.shp' using driver `ESRI Shapefile'
Writing 35 features with 5 fields and geometry type Polygon.
[1] "/Volumes/Temp/tmp/Rtmpah4RXz/Nith_gridcells.shp written to file"
> 
> # generate .rvt file of grid weights
> ValidHRUIDs <- rvh$HRUtable$ID
> tfout <- file.path(tempdir(), "Nith_GridWeights.rvt")
> rvn_gen_gridweights(HRUshpfile, Gridshpfile, ValidHRUIDs,
+ gridIDcol = 'GridIDs', HRUIDcol = "subID", outfile = tfout)
OGR data source with driver: ESRI Shapefile 
Source: "/Volumes/Builds/packages/high-sierra-x86_64/results/4.0/RavenR.Rcheck/RavenR/extdata", layer: "Nith_shapefile_sample"
with 4 features
It has 4 fields
Integer64 fields read as strings:  subID 
OGR data source with driver: ESRI Shapefile 
Source: "/Volumes/Temp/tmp/Rtmpah4RXz", layer: "Nith_gridcells"
with 35 features
It has 5 fields
Error in rvn_gen_gridweights(HRUshpfile, Gridshpfile, ValidHRUIDs, gridIDcol = "GridIDs",  : 
  The projections of the HRU and grid shapefiles need to be the same, please reproject the shapefiles accordingly.
Execution halted