I'm four months into R and have a requirement which seems simple, yet the solutions I see are quite involved. Looking for a suggestion on how I can "walk" a column of data in a dataframe and create an adjacent column which contains a value based on a fixed criteria without having to write long ifelse statements. Here's the column I'd like to walk:
Starting at 4, I'd like to add 10 and assign values of "A" to any values falling between or equal to 4 and less than 14. I then want to assign "B" to any values falling between 14 and 24, then "C" to values between 24 and 34 (note there are none), etc. The results should look like this (two columns) given the entered value of 10. My use case has thousands of records to manage.
Any suggestions are appreciated!