Functions smoothN and smoothNI.