jsdataframe.js
function mapNonNa(array, naValue, func) {
  var len = array.length;
  var result = allocArray(len);
  for (var i = 0; i < len; i++) {
    var value = array[i];
    result[i] = isMissing(value) ? naValue : func(value);
  }
  return result;
}
function mapNonNa(array, naValue, func) {
  var len = array.length;
  var result = allocArray(len);
  for (var i = 0; i < len; i++) {
    var value = array[i];
    result[i] = isMissing(value) ? naValue : func(value);
  }
  return result;
}
function mapNonNa ( array , naValue , func ) { var len = array . length ; var result = allocArray ( len ) ; for ( var i = 0 ; i < len ; i ++ ) { var value = array [ i ] ; result [ i ] = isMissing ( value ) ? naValue : func ( value ) ; } return result ; }
Maps the 'func' on all non-missing elements of array while immediately yielding 'naValue' instead of applying 'func' for any missing elements. The returned result will be a new array of the same length as 'array'.
Maps the func on all non - missing elements of array while immediately yielding naValue instead of applying func for any missing elements . The returned result will be a new array of the same length as array .