You got the numbers correct; however, the lowest priority is on horizontal. Looks like R, but it is switched to S because the lowest priority is on the horizontal. If lowest was on vertical, you just take it as it is.
Okay....because your lowest group is on the horizontal, so it has to change. In you example or any example whenever the lowest group is on the horizontal you have to switch your thought. So in this case you got R originally but than you have to see whether your #4 is on the vertical or horizontal. If your #4 group is on the vertical than you keep it as it is. However if your #4 group is on the horizontal you have to change it. Your example it was R but it because S because CH3 being #4 on the horizontal changes it. I hope this helps.