我在 Studio 中使用光栅.tif图像工作。我看过有关使用下面的代码绘制栅格的教程,但是它对我不起作用。我收到错误:
as.double(y) 中的错误:无法将类型“S4”强制为“double”类型的向量
我已经加载了必要的包(raster和rgdal)我也尝试加载arulesViz,但得到了相同的错误
YIELD <- raster("//Users//DevinOsborne//Desktop//Thesis//QGIS projects //Project//Rasters//Images//Yield_wheat.tif")
plot(YIELD,main= "Yield map")
Run Code Online (Sandbox Code Playgroud)