Get the number of rows of a spatial object.
getRows(x, ...) # S4 method for ANY getRows(x) # S4 method for geom getRows(x) # S4 method for Raster getRows(x) # S4 method for SpatRaster getRows(x) # S4 method for matrix getRows(x)
x | the object from which to get the number of rows. |
---|---|
... | other arguments. |
An integer of the number of rows.
Other getters:
getCRS()
,
getCols()
,
getExtent()
,
getFeatures()
,
getGroups()
,
getHistory()
,
getLayers()
,
getNames()
,
getPoints()
,
getRes()
,
getType()
,
getWindow()
getRows(gtGeoms$grid$categorical) #> [1] 56 gc_raster(gtGeoms$grid$categorical) %>% getRows() #> [1] 56 gc_terra(gtGeoms$grid$categorical) %>% getRows() #> [1] 56 getRows(x = matrix(0, 3, 5)) #> [1] 3