.. .. ..@ xmin: num 248
>
> .. .. ..@ xmax: num 2840000
>
> .. .. ..@ ymin: num 107
>
> .. .. ..@ ymax: num 130
>
> ..@ rotated : logi FALSE
>
> ..@ rotation:Formal class '.Rotation' [package "raster"] with 2 slots
>
> .. ..
on Bessel 1841 ellipsoid\",\n"| __truncated__
..@ srs : chr "+proj=somerc +lat_0=46.952405556
+lon_0=7.439583 +k_0=1 +x_0=260 +y_0=120 +ellps=bessel +units=m
+no_defs"
..@ history : list()
..@ z : list()
> e <- extract(r,v)
E
В Mon, 26 Aug 2024 14:33:02 +0200
SIBYLLE STÖCKLI via R-help пишет:
> > # Extract raster values within the shapefile
> > extracted_values <- extract(raster_file, shape_file)
> > # Assuming the shapefile has multiple polygons and you want to
> > # create a boxplot for each
> > data_list <- lapply
Dear community
This example code works
library(raster)
library(sp)
library(rgdal)
library(ggplot2)
# Create some sample raster data
raster_file <- raster(ncol=36, nrow=18)
raster_file[] <- 1:ncell(raster_file)
plot(raster_file)
#Create some sample polygons
cds1 <- rbind(c(-180,-20), c(-160,5),
4 matches
Mail list logo