easystats / correlation

:link: Methods for Correlation Analysis
https://easystats.github.io/correlation/
Other
435 stars 56 forks source link

Some tests are failing for R < 4.0 #281

Open IndrajeetPatil opened 1 year ago

IndrajeetPatil commented 1 year ago

cf. https://github.com/easystats/correlation/actions/runs/6338093602/job/17214505364

On Ubuntu

══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-display_print_dataframe.R:8:3'): display and print method works - markdown ──
Snapshot of code has changed:
old vs new
  "Code"
  "  display(correlation(iris))"
  "Output"
- "  "
- "  "
- "  Table: Correlation Matrix (pearson-method)"
- "  "
- "  |Parameter1   |   Parameter2 |     r |         95% CI | t(148) |         p |"
- "  |:------------|:------------:|:-----:|:--------------:|:------:|:---------:|"
- "  |Sepal.Length |  Sepal.Width | -0.12 |  (-0.27, 0.04) |  -1.44 | 0.152     |"
- "  |Sepal.Length | Petal.Length |  0.87 |   (0.83, 0.91) |  21.65 | < .001*** |"
- "  |Sepal.Length |  Petal.Width |  0.82 |   (0.76, 0.86) |  17.30 | < .001*** |"
- "  |Sepal.Width  | Petal.Length | -0.43 | (-0.55, -0.29) |  -5.77 | < .001*** |"
- "  |Sepal.Width  |  Petal.Width | -0.37 | (-0.50, -0.22) |  -4.79 | < .001*** |"
- "  |Petal.Length |  Petal.Width |  0.96 |   (0.95, 0.97) |  43.39 | < .001*** |"
- "  p-value adjustment method: Holm (1979)"
- "  Observations: 150"
+ "   [1] \"Table: Correlation Matrix (pearson-method)\"                                  "
+ "   [2] \"\"                                                                            "
+ "   [3] \"|Parameter1   |   Parameter2 |     r |         95% CI | t(148) |         p |\""
+ "   [4] \"|:------------|:------------:|:-----:|:--------------:|:------:|:---------:|\""
+ "   [5] \"|Sepal.Length |  Sepal.Width | -0.12 |  (-0.27, 0.04) |  -1.44 | 0.152     |\""
+ "   [6] \"|Sepal.Length | Petal.Length |  0.87 |   (0.83, 0.91) |  21.65 | < .001*** |\""
+ "   [7] \"|Sepal.Length |  Petal.Width |  0.82 |   (0.76, 0.86) |  17.30 | < .001*** |\""
+ "   [8] \"|Sepal.Width  | Petal.Length | -0.43 | (-0.55, -0.29) |  -5.77 | < .001*** |\""
+ "   [9] \"|Sepal.Width  |  Petal.Width | -0.37 | (-0.50, -0.22) |  -4.79 | < .001*** |\""
+ "  [10] \"|Petal.Length |  Petal.Width |  0.96 |   (0.95, 0.97) |  43.39 | < .001*** |\""
+ "  [11] \"p-value adjustment method: Holm (1979)\"                                      "
+ "  [12] \"Observations: 150\"                                                           "
+ "  attr(,\"format\")"
+ "  [1] \"pipe\""
+ "  attr(,\"class\")"
+ "  [1] \"knitr_kable\" \"character\"  "

* Run `testthat::snapshot_accept('display_print_dataframe')` to accept the change.
* Run `testthat::snapshot_review('display_print_dataframe')` to interactively review the change.
── Failure ('test-display_print_dataframe.R:16:3'): display and print method works - HTML ──
Snapshot of code has changed:
old[7:18] vs new[7:20]
  "  --------------------------------------------------------------------"
  "  wt         |        mpg | -0.87 | [-0.93, -0.74] | -9.56 | < .001***"
  "  p-value adjustment method: Holm (1979)Observations: 32"
- "  "
- "  "
- "  Table: Correlation Matrix (pearson-method)"
- "  "
- "  |Parameter1 | Parameter2 |     r |         95% CI | t(30) |         p |"
- "  |:----------|:----------:|:-----:|:--------------:|:-----:|:---------:|"
- "  |wt         |        mpg | -0.87 | (-0.93, -0.74) | -9.56 | < .001*** |"
- "  p-value adjustment method: Holm (1979)"
- "  Observations: 32"
+ "  [1] \"Table: Correlation Matrix (pearson-method)\"                             "
+ "  [2] \"\"                                                                       "
+ "  [3] \"|Parameter1 | Parameter2 |     r |         95% CI | t(30) |         p |\""
+ "  [4] \"|:----------|:----------:|:-----:|:--------------:|:-----:|:---------:|\""
+ "  [5] \"|wt         |        mpg | -0.87 | (-0.93, -0.74) | -9.56 | < .001*** |\""
+ "  [6] \"p-value adjustment method: Holm (1979)\"                                 "
+ "  [7] \"Observations: 32\"                                                       "
+ "  attr(,\"format\")"
+ "  [1] \"pipe\""
+ "  attr(,\"class\")"
+ "  [1] \"knitr_kable\" \"character\"  "

* Run `testthat::snapshot_accept('display_print_dataframe')` to accept the change.
* Run `testthat::snapshot_review('display_print_dataframe')` to interactively review the change.
── Failure ('test-display_print_matrix.R:7:5'): display and print method works - markdown ──
Snapshot of code has changed:
old vs new
  "Code"
  "  display(summary(correlation(iris)))"
  "Output"
- "  "
- "  "
- "  Table: Correlation Matrix (pearson-method)"
- "  "
- "  |Parameter    | Petal.Width | Petal.Length | Sepal.Width |"
- "  |:------------|:-----------:|:------------:|:-----------:|"
- "  |Sepal.Length |     0.82*** |      0.87*** |       -0.12 |"
- "  |Sepal.Width  |    -0.37*** |     -0.43*** |             |"
- "  |Petal.Length |     0.96*** |              |             |"
- "  p-value adjustment method: Holm (1979)"
+ "  [1] \"Table: Correlation Matrix (pearson-method)\"                "
+ "  [2] \"\"                                                          "
+ "  [3] \"|Parameter    | Petal.Width | Petal.Length | Sepal.Width |\""
+ "  [4] \"|:------------|:-----------:|:------------:|:-----------:|\""
+ "  [5] \"|Sepal.Length |     0.82*** |      0.87*** |       -0.12 |\""
+ "  [6] \"|Sepal.Width  |    -0.37*** |     -0.43*** |             |\""
+ "  [7] \"|Petal.Length |     0.96*** |              |             |\""
+ "  [8] \"p-value adjustment method: Holm (1979)\"                    "
+ "  attr(,\"format\")"
+ "  [1] \"pipe\""
+ "  attr(,\"class\")"
+ "  [1] \"knitr_kable\" \"character\"  "

* Run `testthat::snapshot_accept('display_print_matrix')` to accept the change.
* Run `testthat::snapshot_review('display_print_matrix')` to interactively review the change.

[ FAIL 3 | WARN 7 | SKIP 13 | PASS 88 ]