Use plyr to do some fancy parity calculations