NAs are not allowed in subscripted assignments

I got the right way without error, and thanks for your help!!

df$ppiedu2[df$ppi_mm_educ==12 & !is.na(df$ppi_mm_educ)]<- df$education[df$ppi_mm_educ==12 & !is.na(df$ppi_mm_educ)]