I'm trying to create a new column in an R dataframe based on a set of conditions that are mutually exclusive. There is a clever way to achieve this on python using np.select(conditions, choices), instead of np.where (See this solved question). I've been looking for an equivalent on R that allows me to avoid writing a gigantic nested ifelse (which is the equivalent of np.where) without any success.
The amount of conditions that I have can change and I'm implementing a function for this. Therefore, and equivalent could be really helpful. Is there any option to do this? I'm new in R and come from python.
Thank you!