1
Consider the following data.frame:
data <- data.frame(x=c("a","b","c","d"), y=c(2,2,1,2),w=c(4,4,2,2),z=c(25,16,24,30), k=c("sim","nao","sim","nao"))
How to include a new column where we will have value 1 for lines with y=2, w=4 and z<25 & z>15, and value 0 for any other features?