Skip to content

Commit b0c7ca8

Browse files
committed
handle dpars
1 parent a400880 commit b0c7ca8

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: parameters
33
Title: Processing of Model Parameters
4-
Version: 0.24.2.8
4+
Version: 0.24.2.9
55
Authors@R:
66
c(person(given = "Daniel",
77
family = "Lüdecke",

R/utils_format.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,13 @@
592592
# if model has any distributional parameters, check if it's fixed or random
593593
# and create component header
594594
if (!is.null(dpars)) {
595+
# add aliases
596+
if ("zoi" %in% dpars) {
597+
dpars <- c(dpars, "zero_one_inflated")
598+
}
599+
if ("coi" %in% dpars) {
600+
dpars <- c(dpars, "conditional_one_inflated")
601+
}
595602
type_parts <- unlist(strsplit(type, ".", fixed = TRUE))
596603
if (type_parts[1] %in% dpars) {
597604
if (identical(type_parts[2], "fixed")) {
@@ -688,6 +695,10 @@
688695
component_name <- paste0("Random Effects: ", gsub("^random\\.", "", component_name))
689696
}
690697

698+
# clean some special parameter names
699+
component_name <- gsub("zero_one_inflated", "Zero-One-Inflated", component_name)
700+
component_name <- gsub("conditional_one_inflated", "Conditional-One-Inflated", component_name)
701+
691702
# if we show ZI component only, make sure this appears in header
692703
if (!grepl("(Zero-Inflation Component)", component_name, fixed = TRUE) &&
693704
!is.null(formatted_table$Component) &&

0 commit comments

Comments
 (0)