Hi, I've a raster stack with 3 layers.
I need to classify it assigning one class to each unique combination of values. > unique(as.matrix(data_stack)) layer_1 layer_2 layer_3 [1,] 0.2460000000 2 -0.1 [2,] 0.1845000000 2 -0.1 [3,] 0.0000000001 2 -0.1 [4,] 0.0000000001 2 0.0 [5,] 0.1476000000 2 -0.1 I must obtain a raster stack like this: > unique(as.matrix(data_stack)) layer_1 layer_2 layer_3 class [1,] 0.2460000000 2 -0.1 1 [2,] 0.1845000000 2 -0.1 2 [3,] 0.0000000001 2 -0.1 3 [4,] 0.0000000001 2 0.0 4 [5,] 0.1476000000 2 -0.1 5 Thanks in advance, Alfredo _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo