Returns a matrix, each row being one possible combination of integers from
the vectors \((0, 1, \ldots, p_i-1)\), for \(i\)
between 1 and length(p).
Based on bincombinations from package e1071, which provides
the binary case.
powerSetMat is just a wrapper for combinations(rep(2, n)).