msleckman / chart-challenge-22

#30DayChartChallenge 2022, USGS edition
0 stars 0 forks source link

levelplot() not running in targets pipeline #1

Closed msleckman closed 2 years ago

msleckman commented 2 years ago

I have had no problems initially in using levelplot() to process and plot categorical/ratified rasters (ratify(raster)) w/ legend. Outside the pipeline, using individual raster objects, I was able to produce multiple pngs of the plots in the for in function produce_lc_img().

In the pipeline, I am Getting the following error:

x error target p3_save_map_frames
• end pipeline
Error in tar_throw_run(target$metrics$error) : 
  no applicable method for 'levelplot' applied to an object of class "c('RasterLayer', 'Raster', 'BasicRaster')"
Error in `tar_throw_run()`:
! callr subprocess failed: no applicable method for 'levelplot' applied to an object of class "c('RasterLayer', 'Raster', 'BasicRaster')"
Visit https://books.ropensci.org/targets/debugging.html for debugging advice.
Run `rlang::last_error()` to see where the error occurred.