Allowed for secondary groupings and for a grouping vector of characters