I'm trying to run the following code , but have error. Please suggest!
df$ppiedu2[df$ppi_mm_educ==12]<- df$education[df$ppi_mm_educ==12]
Error in df$ppiedu2[df$ppi_mm_educ == 12] <- df$education[df$ppi_mm_educ == :
NAs are not allowed in subscripted assignments