Skip to content

Commit 6454b79

Browse files
authored
Merge pull request #466 from ishaan-arora-1/fix/remove-dead-code-464
Remove dead ggplot2 version check and redundant stringsAsFactors (#464)
2 parents bdf3eab + 3579521 commit 6454b79

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

R/bayesplot-colors.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ color_scheme_view <- function(scheme = NULL) {
189189

190190
#' @export
191191
print.bayesplot_scheme <- function(x, ...) {
192-
tab <- data.frame(unlist(x, use.names = FALSE), stringsAsFactors = FALSE)
192+
tab <- data.frame(unlist(x, use.names = FALSE))
193193
colnames(tab) <- attr(x, "scheme_name") %||% "hex_color"
194194
print(tab, ...)
195195
}

R/zzz.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
packageStartupMessage("- bayesplot theme set to bayesplot::theme_default()")
66
packageStartupMessage(" * Does _not_ affect other ggplot2 plots")
77
packageStartupMessage(" * See ?bayesplot_theme_set for details on theme setting")
8-
if (utils::packageVersion("ggplot2") < "3.4.0") {
9-
packageStartupMessage("\nbayesplot works best with ggplot2 version >= 3.4.0. ",
10-
"\nUse update.packages('ggplot2') to update.")
11-
}
128
}
139
.onLoad <- function(libname, pkgname) {
1410
bayesplot_theme_set()

tests/testthat/data-for-mcmc-tests.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ vdiff_dframe_chains_divergences <- data.frame(
4141
Iteration = rep(1:500, each = 4),
4242
Parameter = "divergent__",
4343
Value = rbinom(2000, size = 1, prob = .02),
44-
Chain = vdiff_dframe_chains$chain,
45-
stringsAsFactors = FALSE
44+
Chain = vdiff_dframe_chains$chain
4645
)
4746

4847
vdiff_dframe_chains_treedepth <- vdiff_dframe_chains_divergences

0 commit comments

Comments
 (0)