r doesn't use if-then