Nazwy Layar w R WorldClim
r <- r[[c(1,12)]]
names(r) <- c("Temp","Prec")
Tense Termite
r <- r[[c(1,12)]]
names(r) <- c("Temp","Prec")
values <- extract(r,points)
df <- cbind.data.frame(coordinates(points),values)
library(raster)
library(sp)
r <- getData("worldclim",var="bio",res=10)
points <- spsample(as(r@extent, 'SpatialPolygons'),n=100, type="random")
head(df)
x y Temp Prec
1 112.95985 52.092650 -37 388
2 163.54612 85.281643 NA NA
3 30.95257 5.932434 270 950
4 64.66979 40.912583 150 150
5 -169.40479 -58.889104 NA NA
6 51.46045 54.813600 36 549
plot(r[[1]])
plot(points,add=T)