## Assign a factor vector with more than 2 levels/labels for a given numeric numeric vector [duplicate]

问题 This question already has answers here : Convert continuous numeric values to discrete categories defined by intervals (2 answers) Closed 15 days ago . everybody. I hope that you would help me to solve my query. For a vector representing the price ($) of apples say, apple <- c(23, 26, 54, 34, 34,