diff --git a/.github/workflows/ci-future.yml b/.github/workflows/ci-future.yml index 18b44994..184cc864 100644 --- a/.github/workflows/ci-future.yml +++ b/.github/workflows/ci-future.yml @@ -1,8 +1,6 @@ name: CI-future on: pull_request: - branches: - - master push: branches: - master diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63790c25..f91b431c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,6 @@ name: CI on: pull_request: - branches: - - master push: branches: - master diff --git a/src/terms.jl b/src/terms.jl index 72bab08f..3617e28b 100644 --- a/src/terms.jl +++ b/src/terms.jl @@ -505,7 +505,6 @@ lazy_modelcols(ft::FunctionTerm, d::NamedTuple) = lazy_modelcols(x, d) = modelcols(x, d) - modelcols(t::ContinuousTerm, d::NamedTuple) = copy.(d[t.sym]) modelcols(t::CategoricalTerm, d::NamedTuple) = t.contrasts[d[t.sym], :] diff --git a/test/modelmatrix.jl b/test/modelmatrix.jl index 6997e0ed..cd92bf9d 100644 --- a/test/modelmatrix.jl +++ b/test/modelmatrix.jl @@ -345,8 +345,7 @@ z = repeat([:e, :f], inner = 4)) f = apply_schema(@formula(r ~ 1 + w*x*y*z), schema(d)) - modelmatrix(f, d) - @test reduce(vcat, last.(modelcols.(Ref(f), Tables.rowtable(d)))') == modelmatrix(f,d) + @test reduce(vcat, last.(modelcols.(Ref(f), Tables.rowtable(d)))') == modelmatrix(f, d) end @testset "modelmatrix and response set schema if needed" begin @@ -400,7 +399,7 @@ @testset "#185 - interactions of scalar terms for row tables" begin t = (a = rand(10), b = rand(10), c = rand(10)) f = apply_schema(@formula(0 ~ a&b&c), schema(t)) - @test vec(modelcols(f.rhs, t)) == modelcols.(Ref(f.rhs), Tables.rowtable(t)) + @test vec(modelcols(f.rhs, t)) == mapreduce(Base.Fix1(modelcols, f.rhs), vcat, Tables.rowtable(t)) end @testset "#112. coefnames should return same type for all rhs: $(f)" for f in [