From 62fd1ddeaa09e0e91021f49839357b15f58ddf76 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 18 Dec 2018 19:22:27 +0100 Subject: [PATCH] release 2.6.2 on CRAN --- DESCRIPTION | 5 ++--- R/sjPlotAnova.R | 6 +++--- R/sjPlotSetTheme.R | 2 +- R/sjTabSPSS.R | 10 +--------- R/sjTabStackFrq.R | 4 ++-- R/tab_model.R | 2 +- R/tidiers.R | 2 ++ README.md | 4 ++-- man/view_df.Rd | 7 +++---- 9 files changed, 17 insertions(+), 25 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 14c4248c..7ff7e373 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,8 +2,8 @@ Package: sjPlot Type: Package Encoding: UTF-8 Title: Data Visualization for Statistics in Social Science -Version: 2.6.1.9000 -Date: 2018-10-14 +Version: 2.6.2 +Date: 2018-12-18 Authors@R: c( person("Daniel", "Lüdecke", email = "d.luedecke@uke.de", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-8895-3206")), person("Carsten", "Schwemmer", email = "carsten.schwemmer@uni-bamberg.de", role = "ctb") @@ -46,7 +46,6 @@ Imports: sjstats (>= 0.17.2), tidyr (>= 0.7.0) Suggests: - AICcmodavg, brms, car, cluster, diff --git a/R/sjPlotAnova.R b/R/sjPlotAnova.R index 004cc090..8e4da8ce 100644 --- a/R/sjPlotAnova.R +++ b/R/sjPlotAnova.R @@ -76,9 +76,9 @@ sjp.aov1 <- function(var.dep, # -------------------------------------------------------- # remove titles if empty # -------------------------------------------------------- - if (!is.null(axis.labels) && axis.labels == "") axis.labels <- NULL - if (!is.null(axis.title) && axis.title == "") axis.title <- NULL - if (!is.null(title) && title == "") title <- NULL + if (!is.null(axis.labels) && length(axis.labels) == 1 && axis.labels == "") axis.labels <- NULL + if (!is.null(axis.title) && length(axis.title) == 1 && axis.title == "") axis.title <- NULL + if (!is.null(title) && length(title) == 1 && title == "") title <- NULL # -------------------------------------------------------- # unlist labels # -------------------------------------------------------- diff --git a/R/sjPlotSetTheme.R b/R/sjPlotSetTheme.R index efdcd4cc..224c71a6 100644 --- a/R/sjPlotSetTheme.R +++ b/R/sjPlotSetTheme.R @@ -560,7 +560,7 @@ sj.setGeomColors <- function(plot, # --------------------------------------------------------- # check for themr options # --------------------------------------------------------- - if (!is.null(geom.colors) && geom.colors == "themr") { + if (!is.null(geom.colors) && geom.colors[1] == "themr") { return(plot) } diff --git a/R/sjTabSPSS.R b/R/sjTabSPSS.R index f3bb6630..243781ca 100644 --- a/R/sjTabSPSS.R +++ b/R/sjTabSPSS.R @@ -38,7 +38,7 @@ #' @param max.len Numeric, indicates how many values and value labels per variable #' are shown. Useful for variables with many different values, where the output #' can be truncated. -#' @param verbose,hide.progress Logical, if \code{TRUE}, a progress bar is displayed +#' @param verbose Logical, if \code{TRUE}, a progress bar is displayed #' while creating the output. #' #' @inheritParams tab_df @@ -97,7 +97,6 @@ view_df <- function(x, max.len = 15, sort.by.name = FALSE, wrap.labels = 50, - hide.progress = FALSE, verbose = TRUE, CSS = NULL, encoding = NULL, @@ -105,13 +104,6 @@ view_df <- function(x, use.viewer = TRUE, remove.spaces = TRUE) { - ## TODO remove hide.progress later - - if (!missing(hide.progress)) { - message("`hide.progress` is deprecated. Please use `verbose` instead.") - verbose <- !hide.progress - } - # check encoding encoding <- get.encoding(encoding, x) diff --git a/R/sjTabStackFrq.R b/R/sjTabStackFrq.R index 2e258a7d..57767e49 100644 --- a/R/sjTabStackFrq.R +++ b/R/sjTabStackFrq.R @@ -146,7 +146,7 @@ sjt.stackfrq <- function(items, value.labels <- sjlabelled::get_labels( items[[1]], attr.only = F, - values = NULL, + values = "n", non.labelled = T ) } @@ -165,7 +165,7 @@ sjt.stackfrq <- function(items, # ---------------------------- if (is.null(value.labels)) value.labels <- as.character(minval:maxval) # check whether missings should be shown - if (show.na) value.labels <- c(value.labels, string.na) + if (show.na) value.labels <- c(value.labels, `NA` = string.na) # save amolunt of values catcount <- length(value.labels) # check length of x-axis-labels and split longer strings at into new lines diff --git a/R/tab_model.R b/R/tab_model.R index cc6cf45b..ab77b439 100644 --- a/R/tab_model.R +++ b/R/tab_model.R @@ -307,7 +307,7 @@ tab_model <- function( models <- list(...) - if (length(class(models[[1]]) == 1) && class(models[[1]]) == "list") + if (length(class(models[[1]])) == 1 && class(models[[1]]) == "list") models <- lapply(models[[1]], function(x) x) names(models) <- unlist(lapply( diff --git a/R/tidiers.R b/R/tidiers.R index 4e0ef0b3..524686ab 100644 --- a/R/tidiers.R +++ b/R/tidiers.R @@ -257,6 +257,8 @@ tidy_stan_model <- function(model, ci.lvl, tf, type, bpe, show.zeroinf, facets, dat <- dplyr::slice(dat, !! -resp.cor) } + # do transformation on posterior samples first, + # then summarize (see https://discourse.mc-stan.org/t/monotonic-effects-in-non-gaussian-models/6353/5) # need to transform point estimate as well if (!is.null(tf)) { diff --git a/README.md b/README.md index 3741ab61..d18faf34 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ Collection of plotting and table output functions for data visualization. Result To install the latest development snapshot (see latest changes below), type following commands into the R console: ```r -library(githubinstall) -githubinstall::githubinstall("sjPlot") +library(devtools) +devtools::install_github("sjPlot") ``` Please note the package dependencies when installing from GitHub. The GitHub version of this package may depend on latest GitHub versions of my other packages, so you may need to install those first, if you encounter any problems. Here's the order for installing packages from GitHub: diff --git a/man/view_df.Rd b/man/view_df.Rd index de37518f..967811cd 100644 --- a/man/view_df.Rd +++ b/man/view_df.Rd @@ -9,9 +9,8 @@ view_df(x, weight.by = NULL, alternate.rows = TRUE, show.id = TRUE, show.labels = TRUE, show.frq = FALSE, show.prc = FALSE, show.wtd.frq = FALSE, show.wtd.prc = FALSE, show.na = FALSE, max.len = 15, sort.by.name = FALSE, wrap.labels = 50, - hide.progress = FALSE, verbose = TRUE, CSS = NULL, - encoding = NULL, file = NULL, use.viewer = TRUE, - remove.spaces = TRUE) + verbose = TRUE, CSS = NULL, encoding = NULL, file = NULL, + use.viewer = TRUE, remove.spaces = TRUE) } \arguments{ \item{x}{A (labelled) data frame, imported by \code{\link[sjlabelled]{read_spss}}, @@ -69,7 +68,7 @@ order in the data frame.} \item{wrap.labels}{Numeric, determines how many chars of the value, variable or axis labels are displayed in one line and when a line break is inserted.} -\item{verbose, hide.progress}{Logical, if \code{TRUE}, a progress bar is displayed +\item{verbose}{Logical, if \code{TRUE}, a progress bar is displayed while creating the output.} \item{CSS}{A \code{\link{list}} with user-defined style-sheet-definitions,