I have a data set and I would like to group them in a category... But I would like the category to be more than and less than a certain number?
This is my data set.<
Does this work?
df<- cbind(df, temp_category=cut(df$avg.temp, breaks=c(-Inf,4,5,6,Inf))) #the following is more idiomatic df$temp_category <- cut(df$avg.temp, breaks=c(-Inf,4,5,6,Inf))