Fixed: y[is.na(y)] <- 3