I have a single-band raster showing different land cover classes. I want to convert it to a polygon shapefile. I tried to use the rasterToPolygons function with the option to dissolve neighboring similar values. It takes hours to complete it. Are there any alternative fast options? Here is additonal information about the file
class : RasterLayer
:Formal class '.RasterFile' [package "raster"] with 13 slots
dimensions : 618, 1543, 953574 (nrow, ncol, ncell)
resolution : 0.001619785, 0.001619808 (x, y)
extent : -107.9999, -105.5005, 48.99976, 50.00081 (xmin, xmax, ymin, ymax)
crs : +proj=longlat +datum=WGS84 +no_defs
source : memory
names : testNALCMSlatlon252
values : 1, 18 (min, max)