Skip to content

Commit b941d6a

Browse files
authored
Merge pull request #971 from strengejacke/strengejacke/issue970
Namespace clash with new ggplot2 version
2 parents 374e4df + 1d7291c commit b941d6a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+4036
-3448
lines changed

DESCRIPTION

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Package: sjPlot
22
Type: Package
33
Encoding: UTF-8
44
Title: Data Visualization for Statistics in Social Science
5-
Version: 2.8.17
5+
Version: 2.9.0
66
Authors@R: c(
77
person("Daniel", "Lüdecke", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-8895-3206")),
88
person("Alexander", "Bartel", role = "ctb", comment = c(ORCID = "0000-0002-1280-6138")),
@@ -21,7 +21,7 @@ Description: Collection of plotting and table output functions for data
2121
labelled data.
2222
License: GPL-3
2323
Depends:
24-
R (>= 3.6)
24+
R (>= 4.1)
2525
Imports:
2626
graphics,
2727
grDevices,
@@ -34,7 +34,6 @@ Imports:
3434
ggplot2 (>= 3.2.0),
3535
knitr,
3636
insight,
37-
MASS,
3837
parameters,
3938
performance,
4039
purrr,
@@ -59,6 +58,7 @@ Suggests:
5958
ggridges,
6059
httr,
6160
lme4,
61+
MASS,
6262
nFactors,
6363
pscl,
6464
psych,
@@ -73,3 +73,4 @@ URL: https://strengejacke.github.io/sjPlot/
7373
BugReports: https://github.com/strengejacke/sjPlot/issues
7474
RoxygenNote: 7.3.2
7575
VignetteBuilder: knitr
76+
Remotes: easystats/performance, easystats/parameters

NAMESPACE

Lines changed: 0 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export(plot_frq)
3030
export(plot_gpt)
3131
export(plot_grid)
3232
export(plot_grpfrq)
33-
export(plot_kfold_cv)
3433
export(plot_likert)
3534
export(plot_model)
3635
export(plot_models)
@@ -43,9 +42,7 @@ export(scale_color_sjplot)
4342
export(scale_fill_sjplot)
4443
export(set_theme)
4544
export(show_sjplot_pals)
46-
export(sjp.aov1)
4745
export(sjp.chi2)
48-
export(sjp.corr)
4946
export(sjp.poly)
5047
export(sjplot)
5148
export(sjplot_pal)
@@ -66,124 +63,8 @@ export(theme_blank)
6663
export(theme_sjplot)
6764
export(theme_sjplot2)
6865
export(view_df)
69-
import(ggplot2)
70-
importFrom(dplyr,"%>%")
71-
importFrom(dplyr,arrange)
72-
importFrom(dplyr,bind_rows)
73-
importFrom(dplyr,case_when)
74-
importFrom(dplyr,filter)
75-
importFrom(dplyr,group_by)
76-
importFrom(dplyr,group_modify)
77-
importFrom(dplyr,group_vars)
78-
importFrom(dplyr,if_else)
79-
importFrom(dplyr,mutate)
80-
importFrom(dplyr,n_distinct)
81-
importFrom(dplyr,select)
82-
importFrom(dplyr,slice)
83-
importFrom(dplyr,summarize)
84-
importFrom(ggeffects,ggeffect)
85-
importFrom(ggeffects,ggpredict)
86-
importFrom(grDevices,axisTicks)
87-
importFrom(grDevices,cm)
88-
importFrom(grDevices,colorRampPalette)
89-
importFrom(grDevices,dev.off)
90-
importFrom(grDevices,jpeg)
91-
importFrom(grDevices,png)
92-
importFrom(grDevices,rgb)
93-
importFrom(grDevices,svg)
94-
importFrom(grDevices,tiff)
95-
importFrom(graphics,plot)
96-
importFrom(insight,has_intercept)
97-
importFrom(insight,is_multivariate)
98-
importFrom(insight,model_info)
9966
importFrom(knitr,asis_output)
10067
importFrom(knitr,knit_print)
101-
importFrom(performance,cronbachs_alpha)
102-
importFrom(performance,performance_aic)
103-
importFrom(performance,performance_aicc)
104-
importFrom(purrr,as_vector)
105-
importFrom(purrr,flatten_chr)
106-
importFrom(purrr,map)
107-
importFrom(purrr,map_chr)
108-
importFrom(purrr,map_dbl)
109-
importFrom(purrr,map_df)
110-
importFrom(purrr,map_if)
111-
importFrom(purrr,map_lgl)
112-
importFrom(purrr,pmap)
11368
importFrom(rlang,.data)
11469
importFrom(rlang,enquo)
11570
importFrom(rlang,quo_name)
116-
importFrom(scales,brewer_pal)
117-
importFrom(scales,grey_pal)
118-
importFrom(scales,percent)
119-
importFrom(sjlabelled,copy_labels)
120-
importFrom(sjlabelled,drop_labels)
121-
importFrom(sjlabelled,get_label)
122-
importFrom(sjlabelled,get_labels)
123-
importFrom(sjlabelled,get_values)
124-
importFrom(sjlabelled,set_labels)
125-
importFrom(sjmisc,add_variables)
126-
importFrom(sjmisc,frq)
127-
importFrom(sjmisc,group_labels)
128-
importFrom(sjmisc,group_var)
129-
importFrom(sjmisc,is_empty)
130-
importFrom(sjmisc,is_even)
131-
importFrom(sjmisc,is_float)
132-
importFrom(sjmisc,is_num_fac)
133-
importFrom(sjmisc,to_value)
134-
importFrom(sjmisc,trim)
135-
importFrom(sjmisc,var_type)
136-
importFrom(sjmisc,word_wrap)
137-
importFrom(sjstats,cramer)
138-
importFrom(sjstats,crosstable_statistics)
139-
importFrom(sjstats,phi)
140-
importFrom(sjstats,table_values)
141-
importFrom(stats,aov)
142-
importFrom(stats,binomial)
143-
importFrom(stats,chisq.test)
144-
importFrom(stats,coef)
145-
importFrom(stats,complete.cases)
146-
importFrom(stats,confint)
147-
importFrom(stats,cor)
148-
importFrom(stats,cor.test)
149-
importFrom(stats,dchisq)
150-
importFrom(stats,deviance)
151-
importFrom(stats,df)
152-
importFrom(stats,dnorm)
153-
importFrom(stats,dt)
154-
importFrom(stats,fisher.test)
155-
importFrom(stats,fitted)
156-
importFrom(stats,ftable)
157-
importFrom(stats,glm)
158-
importFrom(stats,kruskal.test)
159-
importFrom(stats,lm)
160-
importFrom(stats,loess)
161-
importFrom(stats,logLik)
162-
importFrom(stats,na.omit)
163-
importFrom(stats,na.pass)
164-
importFrom(stats,pchisq)
165-
importFrom(stats,pf)
166-
importFrom(stats,pnorm)
167-
importFrom(stats,poly)
168-
importFrom(stats,ppoints)
169-
importFrom(stats,prcomp)
170-
importFrom(stats,predict)
171-
importFrom(stats,pt)
172-
importFrom(stats,qchisq)
173-
importFrom(stats,qf)
174-
importFrom(stats,qnorm)
175-
importFrom(stats,qt)
176-
importFrom(stats,quantile)
177-
importFrom(stats,reshape)
178-
importFrom(stats,residuals)
179-
importFrom(stats,rstudent)
180-
importFrom(stats,sd)
181-
importFrom(stats,summary.lm)
182-
importFrom(stats,weighted.mean)
183-
importFrom(stats,xtabs)
184-
importFrom(tidyr,gather)
185-
importFrom(tidyr,nest)
186-
importFrom(tidyr,spread)
187-
importFrom(utils,browseURL)
188-
importFrom(utils,setTxtProgressBar)
189-
importFrom(utils,txtProgressBar)

NEWS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# sjPlot 2.9.0
2+
3+
* Fix namespace clash with new ggplot2 version.
4+
5+
* Fix confusing warning message.
6+
7+
* Fix incorrect labeling of coefficients when `transform = NULL` with a probit
8+
model.
9+
10+
* Corrected documentation for `tab_model()` and `plot_model()` regarding the
11+
`p.adjust` argument.
12+
113
# sjPlot 2.8.17
214

315
## Bug fixes

R/S3-methods.R

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#' @importFrom utils browseURL
21
#' @export
32
print.sjTable <- function(x, ...) {
43
# check if we have filename specified
@@ -20,7 +19,6 @@ print.sjTable <- function(x, ...) {
2019
}
2120
}
2221

23-
2422
#' @importFrom knitr knit_print asis_output
2523
#' @export
2624
knit_print.sjTable <- function(x, ...) {
@@ -209,7 +207,6 @@ pgrpmean <- function(x, ...) {
209207
}
210208

211209

212-
#' @importFrom purrr map_chr
213210
pgrpmeans <- function(x, ...) {
214211
uv <- attr(x, "print", exact = TRUE) == "viewer"
215212
enc <- attr(x, "encoding", exact = TRUE)
@@ -221,7 +218,7 @@ pgrpmeans <- function(x, ...) {
221218
"Mean for %s by %s<br><span class=\"subtitle\">grouped by %s</span>",
222219
attr(.x, "dv.label", exact = TRUE),
223220
attr(.x, "grp.label", exact = TRUE),
224-
gsub(pattern = "\n", replacement = "<br>", attr(.x, "group", exact = TRUE), fixed = T)
221+
gsub(pattern = "\n", replacement = "<br>", attr(.x, "group", exact = TRUE), fixed = TRUE)
225222
))
226223

227224
footnotes <- purrr::map_chr(x, ~ sprintf(
@@ -343,13 +340,11 @@ preliab <- function(x, ...) {
343340
}
344341

345342

346-
#' @importFrom purrr map_if
347-
#' @importFrom sjmisc is_float
348343
pdescr <- function(x, ...) {
349344
digits <- 2
350345

351346
# do we have digits argument?
352-
add.args <- lapply(match.call(expand.dots = F)$`...`, function(x) x)
347+
add.args <- lapply(match.call(expand.dots = FALSE)$`...`, function(x) x)
353348
if ("digits" %in% names(add.args)) digits <- eval(add.args[["digits"]])
354349

355350
uv <- attr(x, "print", exact = TRUE) == "viewer"
@@ -376,8 +371,8 @@ pdescr <- function(x, ...) {
376371
present_columns <- c("var", "type", "label", "n", "NA.prc", "mean", "sd", "se", "md", "trimmed", "range", "skew")
377372
chead <- chead[which(present_columns %in% colnames(x))]
378373

379-
x <- x %>%
380-
purrr::map_if(sjmisc::is_float, ~ round(.x, digits)) %>%
374+
x <- x |>
375+
purrr::map_if(sjmisc::is_float, ~ round(.x, digits)) |>
381376
as.data.frame()
382377

383378
tab_df(
@@ -404,18 +399,16 @@ pdescr <- function(x, ...) {
404399
}
405400

406401

407-
#' @importFrom purrr map_if map_chr map
408-
#' @importFrom sjmisc is_float
409402
pgdescr <- function(x, ...) {
410403
titles <- purrr::map_chr(x, ~ sprintf(
411404
"Basic descriptives<br><span class=\"subtitle\"><em>grouped by</em> %s</span>",
412-
gsub(pattern = "\n", replacement = "<br>", attr(.x, "group", exact = TRUE), fixed = T)
405+
gsub(pattern = "\n", replacement = "<br>", attr(.x, "group", exact = TRUE), fixed = TRUE)
413406
))
414407

415408
digits <- 2
416409

417410
# do we have digits argument?
418-
add.args <- lapply(match.call(expand.dots = F)$`...`, function(x) x)
411+
add.args <- lapply(match.call(expand.dots = FALSE)$`...`, function(x) x)
419412
if ("digits" %in% names(add.args)) digits <- eval(add.args[["digits"]])
420413

421414
uv <- attr(x, "print", exact = TRUE) == "viewer"
@@ -439,12 +432,12 @@ pgdescr <- function(x, ...) {
439432
"Skewness"
440433
)
441434

442-
x <- x %>%
435+
x <- x |>
443436
purrr::map(~ purrr::map_if(
444437
.x,
445438
sjmisc::is_float,
446439
~ round(.x, digits)
447-
) %>% as.data.frame())
440+
) |> as.data.frame())
448441

449442
tab_dfs(
450443
x = x,
@@ -468,9 +461,6 @@ pgdescr <- function(x, ...) {
468461
}
469462

470463

471-
#' @importFrom purrr map_if map_chr map
472-
#' @importFrom dplyr n_distinct select
473-
#' @importFrom sjmisc is_empty
474464
pfrq <- function(x, ...) {
475465

476466
uv <- attr(x, "print", exact = TRUE) == "viewer"
@@ -485,8 +475,8 @@ pfrq <- function(x, ...) {
485475
ret <- ""
486476

487477
# get variable label
488-
lab <- attr(i, "label", exact = T)
489-
vt <- attr(i, "vartype", exact = T)
478+
lab <- attr(i, "label", exact = TRUE)
479+
vt <- attr(i, "vartype", exact = TRUE)
490480

491481
# fix variable type string
492482
if (!sjmisc::is_empty(vt))
@@ -497,21 +487,21 @@ pfrq <- function(x, ...) {
497487
if (!is.null(lab)) ret <- sprintf("%s%s", lab, vt)
498488

499489
# get grouping title label
500-
grp <- attr(i, "group", exact = T)
490+
grp <- attr(i, "group", exact = TRUE)
501491

502492
if (!is.null(grp))
503493
ret <- sprintf("%s<br><span class=\"subtitle\"><em>grouped by:</em><br>%s</span>", ret, grp)
504494

505-
gsub(pattern = "\n", replacement = "<br>", x = ret, fixed = T)
495+
gsub(pattern = "\n", replacement = "<br>", x = ret, fixed = TRUE)
506496
})
507497

508498

509499
footnotes <- purrr::map_chr(x, ~ sprintf(
510500
"total N=%i &middot; valid N=%i &middot; x&#772;=%.2f &middot; &sigma;=%.2f\n",
511501
sum(.x$frq, na.rm = TRUE),
512502
sum(.x$frq[1:(nrow(.x) - 1)], na.rm = TRUE),
513-
attr(.x, "mean", exact = T),
514-
attr(.x, "sd", exact = T)
503+
attr(.x, "mean", exact = TRUE),
504+
attr(.x, "sd", exact = TRUE)
515505
)
516506
)
517507

@@ -549,7 +539,6 @@ pfrq <- function(x, ...) {
549539
}
550540

551541

552-
#' @importFrom stats na.omit kruskal.test
553542
pmwu <- function(x, ...) {
554543
fn <- NULL
555544

R/color_utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ get_sjplot_colorpalette <- function(pal, len) {
5757
col <- sjplot_colors[[pal]]
5858

5959
if (len > length(col)) {
60-
warning("More colors requested than length of color palette.", call. = F)
60+
warning("More colors requested than length of color palette.", call. = FALSE)
6161
len <- length(col)
6262
}
6363

0 commit comments

Comments
 (0)