# import raster image
data(normforest)
normforest <- terra::unwrap(normforest)
# calculate metrics
srwvals <- srw(normforest)
# extract each value
Srw <- srwvals[1]
Srwi <- srwvals[2]
Shw <- srwvals[3]
Run the code above in your browser using DataLab