Get the name(s) of a spatial object.
getNames(x, ...) # S4 method for ANY getNames(x) # S4 method for geom getNames(x) # S4 method for sf getNames(x) # S4 method for Spatial getNames(x) # S4 method for Raster getNames(x) # S4 method for SpatRaster getNames(x)
| x | the object from which to get the name. |
|---|---|
| ... | other arguments. |
A vector of the names of x.
Other getters:
getCRS(),
getCols(),
getExtent(),
getFeatures(),
getGroups(),
getHistory(),
getLayers(),
getPoints(),
getRes(),
getRows(),
getType(),
getWindow()
getNames(gtGeoms$line) #> [1] "line_geom" getNames(gtGeoms$grid$categorical) #> [1] "categorical_grid_geom" gc_sf(gtGeoms$line) %>% getNames() #> [1] "geom" gc_raster(gtGeoms$grid$categorical) %>% getNames() #> [1] "layer" gc_terra(gtGeoms$grid$categorical) %>% getNames() #> [1] "cover"