I have a data frame with more than 400.000 observations and I\'m trying to add a column to it which its values depend on another column and sometimes multiple ones.
Same idea but assign it like this instead. No package needed.
M$Size <- ifelse(M$Number <= 50, 'Small', ifelse(M$Number <= 70, 'Medium', 'Big'))
Result:
Letter Number Size 1 A 5 Small 2 B 100 Big 3 C 60 Medium