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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: buildRAT
> ### Title: Build a GDAL Raster Attribute Table with VALUE, COUNT
> ### Aliases: buildRAT
> 
> ### ** Examples
> 
> evt_file <- system.file("extdata/storml_evt.tif", package="gdalraster")
> # make a copy to modify
> f <- paste0(tempdir(), "/", "storml_evt_tmp.tif")
> file.copy(evt_file,  f)
[1] TRUE
> 
> ds <- new(GDALRaster, f, read_only=FALSE)
> ds$getDefaultRAT(band=1) # NULL
NULL
> 
> # get the full attribute table for LANDFIRE EVT from the CSV file
> evt_csv <- system.file("extdata/LF20_EVT_220.csv", package="gdalraster")
> evt_df <- read.csv(evt_csv)
> nrow(evt_df)
[1] 860
> head(evt_df)
  VALUE                                            EVT_NAME EVT_LF EVT_PHYS   R
1 -9999                                         Fill-NoData   <NA>     <NA> 255
2  7008                          North Pacific Oak Woodland   Tree Hardwood 203
3  7009 Northwestern Great Plains Aspen Forest and Parkland   Tree Hardwood 192
4  7010       Northern Rocky Mountain Western Larch Savanna   Tree  Conifer 180
5  7011            Rocky Mountain Aspen Forest and Woodland   Tree Hardwood 192
6  7012       Rocky Mountain Bigtooth Maple Ravine Woodland   Tree Hardwood 171
    G   B      RED GREEN     BLUE
1 255 255 1.000000     1 1.000000
2 255 171 0.796078     1 0.670588
3 255 138 0.752941     1 0.541176
4 255 148 0.705882     1 0.580392
5 255 138 0.752941     1 0.541176
6 255 138 0.670588     1 0.541176
> evt_df <- evt_df[,1:7]
> 
> tbl <- buildRAT(ds,
+                 table_type = "thematic",
+                 na_value = -9999,
+                 join_df = evt_df)
scanning raster...
0...10...20...30...40...50...60...70...80...90...100 - done.
> 
> nrow(tbl)
[1] 24
> head(tbl)
  VALUE COUNT                                                          EVT_NAME
1 -9999   876                                                       Fill-NoData
2  7011    28                          Rocky Mountain Aspen Forest and Woodland
3  7046  4564           Northern Rocky Mountain Subalpine Woodland and Parkland
4  7050   570                              Rocky Mountain Lodgepole Pine Forest
5  7055   889 Rocky Mountain Subalpine Dry-Mesic Spruce-Fir Forest and Woodland
6  7056   304 Rocky Mountain Subalpine Mesic-Wet Spruce-Fir Forest and Woodland
  EVT_LF EVT_PHYS   R   G   B
1   <NA>     <NA> 255 255 255
2   Tree Hardwood 192 255 138
3   Tree  Conifer 191 255 233
4   Tree  Conifer 163 240 219
5   Tree  Conifer 236 252 204
6   Tree  Conifer 236 252 204
> 
> # attributes on the data frame and its columns define usage in a GDAL RAT
> attributes(tbl)
$names
[1] "VALUE"    "COUNT"    "EVT_NAME" "EVT_LF"   "EVT_PHYS" "R"        "G"       
[8] "B"       

$row.names
 [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

$class
[1] "data.frame"

$GDALRATTableType
[1] "thematic"

> attributes(tbl$VALUE)
$GFU
[1] "MinMax"

> attributes(tbl$COUNT)
$GFU
[1] "PixelCount"

> attributes(tbl$EVT_NAME)
$GFU
[1] "Name"

> attributes(tbl$EVT_LF)
$GFU
[1] "Generic"

> attributes(tbl$EVT_PHYS)
$GFU
[1] "Generic"

> attributes(tbl$R)
$GFU
[1] "Red"

> attributes(tbl$G)
$GFU
[1] "Green"

> attributes(tbl$B)
$GFU
[1] "Blue"

> 
> ds$setDefaultRAT(band=1, tbl)
[1] TRUE
> ds$flushCache()
> 
> tbl2 <- ds$getDefaultRAT(band=1)
0...10...20...30...40...50...60...70...80...90...100 - done.
> nrow(tbl2)
[1] 24
> head(tbl2)
  VALUE COUNT                                                          EVT_NAME
1 -9999   876                                                       Fill-NoData
2  7011    28                          Rocky Mountain Aspen Forest and Woodland
3  7046  4564           Northern Rocky Mountain Subalpine Woodland and Parkland
4  7050   570                              Rocky Mountain Lodgepole Pine Forest
5  7055   889 Rocky Mountain Subalpine Dry-Mesic Spruce-Fir Forest and Woodland
6  7056   304 Rocky Mountain Subalpine Mesic-Wet Spruce-Fir Forest and Woodland
  EVT_LF EVT_PHYS   R   G   B
1     NA       NA 255 255 255
2   Tree Hardwood 192 255 138
3   Tree  Conifer 191 255 233
4   Tree  Conifer 163 240 219
5   Tree  Conifer 236 252 204
6   Tree  Conifer 236 252 204
> 
> ds$close()
> deleteDataset(f)
[1] TRUE
> 
> # Display
> evt_gt <- displayRAT(tbl2, title = "Storm Lake EVT Raster Attribute Table")
Error: displayRAT() requires package 'gt'
Execution halted