@@ -554,12 +554,12 @@ end
554
554
555
555
function Base. show (io:: IO , ss:: SummaryStats )
556
556
println (io, " Summary Stats:" )
557
- @printf (io, " Mean: %.6f\n " , ss. mean)
558
- @printf (io, " Minimum: %.6f\n " , ss. min)
559
- @printf (io, " 1st Quartile: %.6f\n " , ss. q25)
560
- @printf (io, " Median: %.6f\n " , ss. median)
561
- @printf (io, " 3rd Quartile: %.6f\n " , ss. q75)
562
- @printf (io, " Maximum: %.6f\n " , ss. max)
557
+ @printf (io, " Mean: %.6f\n " , ss. mean)
558
+ @printf (io, " Minimum: %.6f\n " , ss. min)
559
+ @printf (io, " 1st Quartile: %.6f\n " , ss. q25)
560
+ @printf (io, " Median: %.6f\n " , ss. median)
561
+ @printf (io, " 3rd Quartile: %.6f\n " , ss. q75)
562
+ @printf (io, " Maximum: %.6f\n " , ss. max)
563
563
end
564
564
565
565
@@ -570,4 +570,16 @@ Pretty-print the summary statistics provided by `summarystats`:
570
570
the mean, minimum, 25th percentile, median, 75th percentile, and
571
571
maximum.
572
572
"""
573
- describe {T<:Real} (a:: AbstractArray{T} ) = show (summarystats (a))
573
+ describe (a:: AbstractArray ) = describe (STDOUT, a)
574
+ function describe {T<:Real} (io:: IO , a:: AbstractArray{T} )
575
+ show (io, summarystats (a))
576
+ println (io, " Length: $(length (a)) " )
577
+ println (io, " Type: $(string (eltype (a))) " )
578
+ end
579
+ function describe (io:: IO , a:: AbstractArray )
580
+ println (io, " Summary Stats:" )
581
+ println (io, " Length: $(length (a)) " )
582
+ println (io, " Type: $(string (eltype (a))) " )
583
+ println (io, " Number Unique: $(length (unique (a))) " )
584
+ return
585
+ end
0 commit comments