Skip to content

Commit 80fafb3

Browse files
committed
Fix more 0.6 depwarns
1 parent 19821b9 commit 80fafb3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/statsmodels/formula.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ evt(a) = Any[a]
208208
function Terms(f::Formula)
209209
rhs = condense(distribute(dospecials(f.rhs)))
210210
tt = unique(getterms(rhs))
211-
tt = tt[!(tt .== 1)] # drop any explicit 1's
211+
tt = tt[(!).(tt .== 1)] # drop any explicit 1's
212212
noint = (tt .== 0) .| (tt .== -1) # should also handle :(-(expr,1))
213-
tt = tt[!noint]
213+
tt = tt[(!).(noint)]
214214
oo = Int[ord(t) for t in tt] # orders of interaction terms
215215
if !issorted(oo) # sort terms by increasing order
216216
pp = sortperm(oo)
@@ -232,7 +232,7 @@ end
232232

233233
## Default NA handler. Others can be added as keyword arguments
234234
function na_omit(df::DataFrame)
235-
cc = complete_cases(df)
235+
cc = completecases(df)
236236
df[cc,:], cc
237237
end
238238

src/statsmodels/statsmodel.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ for (modeltype, dfmodeltype) in ((:StatisticalModel, DataFrameStatisticalModel),
5858
end
5959

6060
# Delegate functions from StatsBase that use our new types
61-
typealias DataFrameModels Union{DataFrameStatisticalModel, DataFrameRegressionModel}
61+
const DataFrameModels = Union{DataFrameStatisticalModel, DataFrameRegressionModel}
6262
@delegate DataFrameModels.model [StatsBase.coef, StatsBase.confint,
6363
StatsBase.deviance, StatsBase.nulldeviance,
6464
StatsBase.loglikelihood, StatsBase.nullloglikelihood,

test/formula.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ module TestFormula
383383
d[:x1m] = @data [5, 6, NA, 7]
384384
mf = ModelFrame(@formula(y ~ x1m), d)
385385
mm = ModelMatrix(mf)
386-
@test mm.m[:, 2] == d[complete_cases(d), :x1m]
386+
@test mm.m[:, 2] == d[completecases(d), :x1m]
387387
@test mm.m == ModelMatrix{sparsetype}(mf).m
388388

389389
## Same variable on left and right side

0 commit comments

Comments
 (0)