You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The afrilandcover object can not be plotted using the raster::plot() function.
pacman::p_load_gh("afrimapr/afrilearndata")
pacman::p_load(raster)
# the issue is here:raster::plot(afrilandcover)
#> Error in .local(.Object, ...):# as a comparison, this works:raster::plot(afripop2020)
#![](https://i.imgur.com/YyFGzUV.png)
when I try to plot it using the ggplot2 and stars packages I obtain the following output:
pacman::p_load(ggplot2)
pacman::p_load_gh("afrimapr/afrilearndata")
pacman::p_load(stars)
ggplot() +
geom_stars(data= st_as_stars(afrilandcover))
#> Loading required package: raster#> Warning: package 'raster' was built under R version 4.1.3#> Loading required package: sp#> trying to read file: C:\Dropbox\_afrimapr\data\landcover-modis\MCD12C1.A2019001.Majority_Land_Cover_Type_1.tif#> Error in .local(.Object, ...):
Dear afrilearndata team,
The
afrilandcover
object can not be plotted using theraster::plot()
function.Created on 2022-04-07 by the reprex package (v2.0.1)
when I try to plot it using the
ggplot2
andstars
packages I obtain the following output:Created on 2022-04-07 by the reprex package (v2.0.1)
I hope this reprex be useful to identify a possible issue.
The text was updated successfully, but these errors were encountered: