Closed nickeubank closed 5 years ago
prop
computes proportions, so it needs Number
entries (as documented).
OH! I see -- prop doesn't calculate proportions directly, it takes a frequency table as an input.
Out of curiosity, why the second step? why is it prop(freqtable(df, :some_var))
instead of just having prop
work like freqtable
, just with proportions rather than counts?
See https://github.com/nalimilan/FreqTables.jl/pull/19 and https://github.com/nalimilan/FreqTables.jl/issues/8. We can add proptable
as a shorthand, but prop
is useful in its own right so it was a good first step anyway.
Ah, ok. Yes, I think proptable
would be a really nice function!
Feel free to make a PR if you want.
No problems with
freqtable
: