## identify outliers
outliers <- velout(age, height, id, heights, limit=2)
## plot outliers with code 4 or 6
codeplot(outliers, icode=c(4,6))
## set the 8 outliers missing
newheights <- zapvelout(outliers, icode=6)
Run the code above in your browser using DataLab