Added switch/cases and tested R ops.