Functions for re-sampling a community matrix to compute