From 65c0e3a8dd06b0381aa88c0c01473ca004faad2c Mon Sep 17 00:00:00 2001 From: joshday Date: Tue, 21 Apr 2020 12:35:31 -0400 Subject: [PATCH] docstring --- src/stats.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/stats.jl b/src/stats.jl index be9d933..5603a63 100644 --- a/src/stats.jl +++ b/src/stats.jl @@ -59,6 +59,16 @@ Base.values(o::CountMap) = values(o.value) Base.getindex(o::CountMap, i) = o.value[i] #-----------------------------------------------------------------------------# CountMissing +""" + CountMissing(stat) + +Calculate a `stat` along with the count of `missing` values. + +# Example + + o = CountMissing(Mean()) + fit!(o, [1, missing, 3]) +""" mutable struct CountMissing{T, O<:OnlineStat{T}} <: OnlineStat{Union{Missing,T}} stat::O nmissing::Int