r-spatialecology/landscapemetrics

Error in as.double(y) : cannot coerce type 'S4' to vector of type 'double'

Closed this issue · 3 comments

Hello,

I just started running the codes from https://jakubnowosad.com/posts/2022-02-17-lsm-bp3/ and got the error message when running plot(my_raster). Please help. Thank you.

Dear @arethareth -- we changed the example data in the package last year. To read this data, you need to:

my_raster = raster(terra::rast(augusta_nlcd))

Please make additionally sure that you are using the latest version because there were some recent bugfixes related to sample_lsm

Thank you, both!