I have a vector of temperature values as
temp <- c(2.6, 5.3, 4.6,9.8,9.4,14.1,16.2,16.4,11.6,8.0,3.0,5.0)
Im trying to create a factor to this vector with 3 levels defined as: below 5 (l), between 5 and 15 (m), and above 15 (h). Help appreciated.