我想使用命令 head
将栅格转换为 R 中的表,我正在使用从 Worldclim 站点下载的 .bil 来获取信息。我想在带有坐标(纬度,经度)的表格中显示温度。我怎么做?
当我这样做时:
temperature1<-raster("tmean_8.bil")
head(temperature1)
我得到这样的结果:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
1 260 259 258 258 259 258 258 257 257 256 255 254 255 255 254 252 251 252 250
2 259 258 258 257 258 257 257 257 257 256 256 257 251 251 252 251 255 255 252
3 260 259 258 258 258 258 256 257 257 255 252 253 254 252 253 251 251 253 253
4 258 257 258 258 256 254 258 258 257 257 255 256 255 257 254 252 255 255 255
....
最佳答案
尝试这个
as.data.frame(temperature, xy = TRUE)
关于使用 r 将栅格转为表格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25477272/