gaussy.jl: fix function index; handle sort() of DataArray with NA