R worksheet: contingency tables