Adaptive Smoothing - Example 1 (R)