Maps numeric items in `x`

into groups with sum
less or equal than `capacity`

.
A very simple greedy algorithm is used, which is not really optimized
for speed. This is a convenience function for smaller vectors, not
a competetive solver for the real binbacking problem.
If an element of `x`

exceeds `capacity`

, an error
is thrown.

1 | ```
binPack(x, capacity)
``` |

`x` |
[ |

`capacity` |
[ |

[`integer`

]. Integer with values “1” to “n.bins”
indicating bin membership.

1 2 3 4 5 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.