The function loops through each group and tests if cLO or cUP have been violated
for the given group. This is a helper function for rp_transform
.
group_fail(weights, groups, cLO, cUP, group_pos = NULL)
weights vector to test
list of vectors specifying the groups of the assets
numeric or vector specifying minimum weight group constraints
numeric or vector specifying minimum weight group constraints
vector specifying the number of non-zero weights per group
logical vector: TRUE if group constraints are violated for a given group