Add support for using weights and including/excluding selected tows for both one- and two-way tabulations.