R Apply Function To Multiple Columns