@@ -88,7 +88,7 @@ function allvars(ex::Expr)
88
88
end
89
89
allvars (f:: Formula ) = unique (vcat (allvars (f. rhs), allvars (f. lhs)))
90
90
allvars (sym:: Symbol ) = [sym]
91
- allvars (v:: Any ) = Array ( Symbol, 0 )
91
+ allvars (v:: Any ) = Vector { Symbol} ( 0 )
92
92
93
93
# special operators in formulas
94
94
const specials = Set ([:+ , :- , :* , :/ , :& , :| , :^ ])
@@ -208,9 +208,9 @@ evt(a) = Any[a]
208
208
function Terms (f:: Formula )
209
209
rhs = condense (distribute (dospecials (f. rhs)))
210
210
tt = unique (getterms (rhs))
211
- tt = tt[! (tt .== 1 )] # drop any explicit 1's
211
+ tt = tt[( ! ) . (tt .== 1 )] # drop any explicit 1's
212
212
noint = (tt .== 0 ) .| (tt .== - 1 ) # should also handle :(-(expr,1))
213
- tt = tt[! noint]
213
+ tt = tt[( ! ) . ( noint) ]
214
214
oo = Int[ord (t) for t in tt] # orders of interaction terms
215
215
if ! issorted (oo) # sort terms by increasing order
216
216
pp = sortperm (oo)
232
232
233
233
# # Default NA handler. Others can be added as keyword arguments
234
234
function na_omit (df:: DataFrame )
235
- cc = complete_cases (df)
235
+ cc = completecases (df)
236
236
df[cc,:], cc
237
237
end
238
238
@@ -415,7 +415,7 @@ function droprandomeffects(trms::Terms)
415
415
if ! any (retrms) # return trms unchanged
416
416
trms
417
417
elseif all (retrms) && ! trms. response # return an empty Terms object
418
- Terms (Any[],Any[],Array ( Bool, (0 ,0 )), Array ( Bool, (0 ,0 ) ), Int[], false , trms. intercept)
418
+ Terms (Any[],Any[],Matrix { Bool} (0 ,0 ), Matrix { Bool} (0 ,0 ), Int[], false , trms. intercept)
419
419
else
420
420
# the rows of `trms.factors` correspond to `eterms`, the columns to `terms`
421
421
# After dropping random-effects terms we drop any eterms whose rows are all false
0 commit comments