MDLD/local extrema (R)