SpatRaster or SpatVector to data.frame
Coerce a SpatRaster or SpatVector into a data.frame or a SpatVector into list
## S4 method for signature 'SpatVector' as.data.frame(x, geom=NULL) ## S4 method for signature 'SpatRaster' as.data.frame(x, xy=FALSE, cells=FALSE, na.rm=TRUE) ## S4 method for signature 'SpatVector' as.list(x, geom=NULL) ## S4 method for signature 'SpatRaster' as.list(x)
| x | SpatVector | 
| geom | character or NULL. If not NULL, either "WKT" or "HEX", to get the geometry included in Well-Known-Text or hexadecimal notation | 
| xy | logical. If  | 
| cells | logical. If  | 
| na.rm | logical. If  | 
data.frame
f <- system.file("ex/lux.shp", package="terra")
v <- vect(f)
as.data.frame(v)
as.list(v)Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.