I have a dataframe that looks something like the following.
KEYCODE= c("A","B","C","D")
values = list(c("12,3"),c("2"),c("2,7"),c("16"))
df = data.frame(KEYCODE=KEYCODE, values=cbind(values))
Now, I want to create a third column that will create values of 0 when the values field do not have anything between 7 to 18, else it will crate a value of 1. For instance, My new df with the new column
Unfortunately, the elements in the values field are strings.
Thank in advance.