This function helps to analyse the patch structure the calculate process is, each patch is squared before the sums for each class i are calculated and the sum is standardized by the total landscape area. it is a aggregation metric.
Value
the returned calculated values are in column "value", and this function returns also some important information such as level, class number and metric name. Moreover, the "id" column, although it is just NA here at class level. we need it because the output struture of metrics at class level should correspond to patch level one by one, and then it is more convinient to combine metric values at different levels and compare them.