R: Error in as.double(y) : cannot coerce type 'S4' to vector of type 'double'— raster data
问题 Im working in Studio with a raster .tif image. I have watched a tutorial on plotting the raster with the code below, however it does not work for me. I get the error: Error in as.double(y) : cannot coerce type 'S4' to vector of type 'double' I have loaded the necessary packages( raster and rgdal ) I have also tried loading the arulesViz , yet get the same error YIELD <- raster("//Users//DevinOsborne//Desktop//Thesis//QGIS projects //Project//Rasters//Images//Yield_wheat.tif") plot(YIELD,main=