I may have a very simple question about changing a variable clasin mine dfbased on if certain conditions are met. If these conditions are not met, do not change anything.
V <- seq(10,50,10)
gr = rep(seq(1,2),each=5)
clas=c("Normal","Abnormal","Fair","Fair","Normal","Fair","Normal","Normal","Abnormal","Fair")
df <- data.frame(V,gr,clas)
I want to set a column clasfor all values Normal, if shown Normal, when V=20and V=30in each group. If this condition is not met, you do not need to change this group.
Expected Result
df_modif
source
share