11# !/usr/bin/r -t
22#
3- # Copyright (C) 2011 - 2019 Douglas Bates, Dirk Eddelbuettel and Romain Francois
3+ # Copyright (C) 2011 - 2021 Douglas Bates, Dirk Eddelbuettel and Romain Francois
44#
55# This file is part of RcppEigen
66#
@@ -27,6 +27,7 @@ flm2 <- fastLmPure(cbind(1, log(trees$Girth)), log(trees$Volume), 2L)
2727flm3 <- fastLmPure(cbind(1 , log(trees $ Girth )), log(trees $ Volume ), 3L )
2828flm4 <- fastLmPure(cbind(1 , log(trees $ Girth )), log(trees $ Volume ), 4L )
2929flm5 <- fastLmPure(cbind(1 , log(trees $ Girth )), log(trees $ Volume ), 5L )
30+ flm6 <- fastLmPure(cbind(1 , log(trees $ Girth )), log(trees $ Volume ), 6L )
3031
3132fit <- lm(log(Volume ) ~ log(Girth ), data = trees )
3233fitCoef <- unname(coef(fit ))
@@ -44,6 +45,11 @@ expect_equal(flm4$coefficients , fitCoef, info="fastLm0.coef")
4445expect_equal(flm4 $ se , fitStdErr , info = " fastLm0.stderr" )
4546expect_equal(flm5 $ coefficients , fitCoef , info = " fastLm0.coef" )
4647expect_equal(flm5 $ se , fitStdErr , info = " fastLm0.stderr" )
48+ expect_equal(flm6 $ coefficients , fitCoef , info = " fastLm0.coef" )
49+ expect_equal(flm6 $ se , fitStdErr , info = " fastLm0.stderr" )
50+
51+ # # check unsupported type
52+ expect_error(fastLmPure(cbind(1 , log(trees $ Girth )), log(trees $ Volume ), 7L ))
4753
4854
4955# test.fastLm.formula <- function() {
0 commit comments