How do you write the statement "between 0 and 15" R? I am transforming a variable into a categorical variable, and the requirement for one of the categories is to recode the new categorical variable so that the old variable (eg. X) becomes new.variable <- X between 0 and 15.
EDIT - clarification of question
I have been given a data set and the instruction are:
Growth patterns are generated by transforming the X variable into a new categorical variable, which can be named "growth". First category is assigned to islands in the X variable that are between 15 to 50. So that is the question, but my main headache is how to write "between 15 to 50" in R language. This is what I have:
growth$mediumgrowth.islands <- growth$SasiaUrban.X[growth$SasiaUrban.X ???]