When doing linear regression, we have seen that our estimates can change dramatically in the presence of influential points. This is usually problematic when dealing with noisy datasets. R exposes the rlm function, which offers several weighting options: Huber, and bi-square among them.
Huber weights are appropriate when we don't have many extreme cases, and bisquare weights are best for those extreme cases. In either case, the algorithm operates in the same fashion, by using iteratively reweighted least squares (IRLS), which is described at the end of this recipe.