How to generate random raster cell values according to the distribution of same values from another raster
In terra I have an existing raster with values range from 1 to 4 in the following proportions.
In terra I have an existing raster with values range from 1 to 4 in the following proportions.