0

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?

www
  • 38,575
  • 12
  • 48
  • 84
  • 1
    `bwplot` is also the name of the original function in the `lattice` package - do you get the same error if you use `rasterVis::bwplot(rast)`? – HFBrowning Feb 09 '17 at 19:37
  • Unfortunately it does not change anything... – MerlinLutin Feb 09 '17 at 19:42
  • Without more information it might be hard to help you - the error you are getting is generic, so it could be caused by many things. Can you provide a minimal reproducible example (http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example)? – HFBrowning Feb 09 '17 at 21:33

0 Answers0