Skip to content

Commit ec584be

Browse files
committed
define parameter_names.matrix to fix R-devel issue
in R 4.0 matrices will also inherit from array so we need a matrix method here to avoid the array method getting called instead of the default method
1 parent 6ef9548 commit ec584be

3 files changed

Lines changed: 15 additions & 7 deletions

File tree

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: bayesplot
22
Type: Package
33
Title: Plotting for Bayesian Models
4-
Version: 1.7.0.9000
5-
Date: 2019-05-22
4+
Version: 1.7.1
5+
Date: 2019-11-25
66
Authors@R: c(person("Jonah", "Gabry", role = c("aut", "cre"), email = "jsg2201@columbia.edu"),
77
person("Tristan", "Mahr", role = "aut"),
88
person("Paul-Christian", "Bürkner", role = "ctb"),

NEWS.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
<!-- See http://style.tidyverse.org/news.html for advice on writing news -->
22

3-
# bayesplot 1.7.0.9000
3+
4+
<!--
5+
# bayesplot 1.7.1.9000
46
57
(GitHub issue/PR numbers in parentheses)
68
7-
<!-- Items for next release go here-->
9+
Items for next release go here
10+
-->
11+
12+
# bayesplot 1.7.1
813

14+
CRAN requested release to fix error at
15+
https://cran.r-project.org/web/checks/check_results_bayesplot.html due to
16+
matrices also inheriting from "array" in R 4.0
917

1018
# bayesplot 1.7.0
1119

R/helpers-mcmc.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,9 @@ parameter_names.array <- function(x) {
310310
parameter_names.default <- function(x) {
311311
colnames(x) %||% abort("No parameter names found.")
312312
}
313-
# parameter_names.matrix <- function(x) {
314-
# colnames(x) %||% abort("No parameter names found.")
315-
# }
313+
parameter_names.matrix <- function(x) {
314+
colnames(x) %||% abort("No parameter names found.")
315+
}
316316

317317
# Check if an object is a 3-D array
318318
is_3d_array <- function(x) {

0 commit comments

Comments
 (0)