Plot <- ggplot() +
geom_spatraster(data = temp_rast, aes(fill = tavg_04)) +
coord_sf(crs = 3857) +
scale_fill_grass_c(palette = "celsius")
lobstr::obj_size(Plot) # this gives an error
object.size(Plot) # this works
# Without the `geom_spatraster` geometry, the function works
Plot <- ggplot() +
# geom_spatraster(data = temp_rast, aes(fill = tavg_04)) +
coord_sf(crs = 3857) +
scale_fill_grass_c(palette = "celsius")
lobstr::obj_size(Plot) # this works
It seems that the function can not read the file size of ggplot object when geom_spatraster is used.
Hello, I am getting the following error when using
lobstr::obj_size
orpryr::object_size
with a ggplot objectHere is a reprex
It seems that the function can not read the file size of ggplot object when
geom_spatraster
is used.