Skip to main content
1 of 2
JPD
  • 1.7k
  • 2
  • 20
  • 33

The glcm function outputs a stack, with each band containing values for each of the statistics calculated. By default, all available statistics are computed.

You won't be able to put this stack into a single band within the brick as you are trying with band[i]<-. This is probably what is giving you the error message.

One solution would be to output each stack to a list and then look at stacking them together once the loop has completed.

JPD
  • 1.7k
  • 2
  • 20
  • 33