Skip to content

Commit

Permalink
use something instead of coalesce in contrasts
Browse files Browse the repository at this point in the history
  • Loading branch information
kleinschmidt committed Jun 21, 2018
1 parent 43aff60 commit efdcbab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/contrasts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function ContrastsMatrix(contrasts::AbstractContrasts, levels::AbstractVector)
# better to filter data frame first
# 3. contrast levels missing from data: would have empty columns, generate a
# rank-deficient model matrix.
c_levels = coalesce(contrasts.levels, levels)
c_levels = something(contrasts.levels, levels)
if eltype(c_levels) != eltype(levels)
throw(ArgumentError("mismatching levels types: got $(eltype(levels)), expected " *
"$(eltype(c_levels)) based on contrasts levels."))
Expand Down

0 comments on commit efdcbab

Please sign in to comment.