diff --git a/DESCRIPTION b/DESCRIPTION index beaf3a5c3..67e87fd6c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: datawizard Title: Easy Data Wrangling and Statistical Transformations -Version: 0.12.3.3 +Version: 0.12.3.4 Authors@R: c( person("Indrajeet", "Patil", , "patilindrajeet.science@gmail.com", role = "aut", comment = c(ORCID = "0000-0003-1995-6531", Twitter = "@patilindrajeets")), diff --git a/NEWS.md b/NEWS.md index 48318e326..8e329b0fb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -11,6 +11,9 @@ CHANGES case, names are used as values for the `replacement` argument (i.e. `pattern` can be a character vector using ` = ""`). +* Minor additions to `reshape_ci()` to work with forthcoming changes in the + `{bayestestR}` package. + # datawizard 0.12.3 CHANGES diff --git a/R/reshape_ci.R b/R/reshape_ci.R index 78512c454..dcfc729a8 100644 --- a/R/reshape_ci.R +++ b/R/reshape_ci.R @@ -45,13 +45,13 @@ reshape_ci <- function(x, ci_type = "CI") { if ("Parameter" %in% names(x)) { idvar <- "Parameter" remove_parameter <- FALSE - } else if (!is.null(attr(x, "idvars"))) { - idvar <- attr(x, "idvars") - remove_parameter <- FALSE - } else { + } else if (is.null(attr(x, "idvars"))) { idvar <- "Parameter" x$Parameter <- NA remove_parameter <- TRUE + } else { + idvar <- attr(x, "idvars") + remove_parameter <- FALSE } x <- stats::reshape(