We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 791def1 commit a657b24Copy full SHA for a657b24
tests/testthat/test-rlm.R
@@ -13,14 +13,17 @@ test_that("fast_rlm", {
13
system.time(r1 <- MASS::rlm(x, y))
14
system.time(r2 <- fast_rlm(x, y))
15
# r2$coefficients is unnamed
16
- expect_equal(r1$coefficients, r2$coefficients, check.attributes = FALSE)
17
-
18
- #del unrelevant parameters before comparison
19
- r1 = r1[names(r2)]
20
- expect_equivalent(r1, r2)
21
- # library(ggplot2)
22
- # ggplot(df, aes(x,y)) +geom_point() + geom_abline(slope = r1$coefficients)
23
- # plot(y~x, data = data.frame(x, y)) + abline(r1)
+ expect_equivalent(r1$coefficients, r2$coefficients)
+ sel = c("coefficients"
+ , "residuals"
+ , "fitted.values"
+ , "weights"
+ , "rank"
+ , "converged"
+ , "wresid"
24
+ , "w" ,"x", "s"
25
+ )
26
+ expect_equivalent(r1[sel], r2[sel])
27
28
29
})
0 commit comments