Remove some uses of CategoricalArrays, update docs#15
Conversation
Since we now assume all non-Real columns are categorical, we can get rid of some methods.
| contrasts::Dict = Dict()) | ||
| df, msng = null_omit(DataTable(map(x -> d[x], trms.eterms))) | ||
| names!(df, convert(Vector{Symbol}, map(string, trms.eterms))) | ||
| for c in eachcol(df) _droplevels!(c[2]) end |
There was a problem hiding this comment.
@kleinschmidt Can you confirm this is OK? I've checked that unused levels continue to be skipped (since we call unique), but I'd like to be sure I'm not missing something.
There was a problem hiding this comment.
LGTM. This is covered by tests: https://github.com/JuliaStats/StatsModels.jl/blob/master/test/modelmatrix.jl#L275
Codecov Report
@@ Coverage Diff @@
## master #15 +/- ##
==========================================
+ Coverage 93.11% 94.25% +1.14%
==========================================
Files 5 5
Lines 334 331 -3
==========================================
+ Hits 311 312 +1
+ Misses 23 19 -4
Continue to review full report at Codecov.
|
| contrasts::Dict = Dict()) | ||
| df, msng = null_omit(DataTable(map(x -> d[x], trms.eterms))) | ||
| names!(df, convert(Vector{Symbol}, map(string, trms.eterms))) | ||
| for c in eachcol(df) _droplevels!(c[2]) end |
There was a problem hiding this comment.
LGTM. This is covered by tests: https://github.com/JuliaStats/StatsModels.jl/blob/master/test/modelmatrix.jl#L275
The first commit fixes docs which were not updated by #13.
The second one removes special cases for
CategoricalArraywhich are no longer really needed.