如何使用R将lat,lon,value形式的数据转换为栅格文件?
我在美国大陆的km网格上有一组数据值,这些列是“纬度”,“经度”和“观测”,例如: "lat" "lon" "yield" 25.567 -120.347 3.6 25.832 -120.400 2.6 26.097 -120.454 3.4 26.363 -120.508 3.1 26.630 -120.562 4.4 或者,作为R数据帧: mydata <- structure(list(lat = c(25.567, 25.832, 26.097, 26.363, 26.63), lon = c(-120.347, -120.4, -120.454, -120.508, -120.562), yield = c(3.6, 2.6, 3.4, 3.1, 4.4)), .Names = c("lat", "lon", "yield"), class = …