StatsBase.jl icon indicating copy to clipboard operation
StatsBase.jl copied to clipboard

corspearman when all the values are NaNs

Open diegozea opened this issue 8 years ago • 8 comments

It looks like an tiedrank's error:

julia> corspearman([1.,2.,3.,4.,5.,6.], [NaN, NaN, NaN, NaN, NaN, NaN])
1.0

julia> rank([NaN, NaN, NaN, NaN, NaN, NaN])
ERROR: MethodError: `rank` has no method matching rank(::Array{Float64,1})

julia> tiedrank([NaN, NaN, NaN, NaN, NaN, NaN])
6-element Array{Float64,1}:
 1.0
 2.0
 3.0
 4.0
 5.0
 6.0

diegozea avatar May 23 '16 18:05 diegozea