[r] Refactor code

- Use cleaner style: remove redundant return, use string interpolation, use && and ||
- Don’t use hardcode integer for columns
[f] Add full_state options to get full name of state