Mybatis If Else Statement In R