I'm trying to create a violin plot for a single raster (initially in GTiff).
Using the library rasterVis, the code should be very simple:
library(raster)
library(rasterVis)
rast <- raster("Temperate_WWR.tif")
bwplot(rast)
The code returns the error:
Error in UseMethod("bwplot"): no applicable method for 'bwplot' applied to an object of class "c('RasterLayer', 'Raster', 'BasicRaster')"
I don't get it...the method applicable for bwplot states that a single raster layer is a legit argument...
Any guess?