Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有从 netcdf 获得的叶绿素数据,平均到最终输出如下。
head(cdata) lat lon chl 1 24.875 30.125 NA 2 24.625 30.125 NA 3 24.375 30.125 NA 4 24.125 30.125 NA 5 23.875 30.125 NA 6 23.625 30.125 NA
我需要用 levelplot() 绘制它,但 levelplot() 需要网格中的数据。如何将数据框转换为网格或数组?
levelplot()如果您的观察来自“常规网格”,您可以使用 Lattice命令传递一个公式。因此,使用您的数据,它将是
levelplot()
levelplot(chl ~ lat*lon, cdata)