Alternatives to nested ifelse statements in R Alternatives to nested ifelse statements in R r r