Skip to content

Commit

Permalink
Merge pull request #45 from josesho/v0.2.2
Browse files Browse the repository at this point in the history
v0.2.2
  • Loading branch information
josesho authored Jul 3, 2019
2 parents 318722c + 6467613 commit 454b2ae
Show file tree
Hide file tree
Showing 42 changed files with 1,293,436 additions and 1,277,693 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ doc
.RData
.Ruserdata
.Rprofile

.DS_Store
*.DS_Store
inst/doc
# revdevcheck temp folder
revdep
# test figures
tests/testthat/Rplots.pdf
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: dabestr
Type: Package
Title: Data Analysis using Bootstrap-Coupled Estimation
Version: 0.2.1
Version: 0.2.2
Authors@R: c(
person("Joses W.", "Ho",
email = "[email protected]", role = c("cre", "aut")),
Expand Down Expand Up @@ -35,6 +35,7 @@ Depends:
Imports:
cowplot,
dplyr,
ellipsis,
ggplot2 (>= 3.0),
forcats,
ggforce,
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# dabestr v0.2.2
* This patch fixes an issue where local variables were duplicated in column names, requiring proper unquoting.

# dabestr v0.2.1
* This release fixes a bug due to the new version of `ellipsis`. (# 37).

Expand Down
11 changes: 7 additions & 4 deletions R/main.R
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ dabest <- function(

for (group in group_list) {


# Check the control group (`group[1]`) is in the x-column.
if (identical(group[1] %in% data_for_diff[[x_quoname]], FALSE)) {

Expand All @@ -251,9 +252,9 @@ dabest <- function(
stop(paste(err1, err2))
}

ctrl <-
data_for_diff %>%
dplyr::filter(!!x_enquo == group[1])
# Patch in v0.2.2.
# Note how we have to unquote both the x_enquo, and the group name!
ctrl <- data_for_diff %>% dplyr::filter(!!x_enquo == !!group[1])

ctrl <- ctrl[[y_quoname]]

Expand Down Expand Up @@ -284,7 +285,9 @@ dabest <- function(
)
}

test <- data_for_diff %>% dplyr::filter(!!x_enquo == grp)
# Patch in v0.2.2.
# Note how we have to unquote both x_enquo, and grp!
test <- data_for_diff %>% dplyr::filter(!!x_enquo == !!grp)
test <- test[[y_quoname]]
t <- na.omit(test)

Expand Down
11 changes: 8 additions & 3 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#'
#' @param x A \code{dabest} object, generated by the function of the same name.
#'
#' @param ... Signature for S3 generic function.
#'
#' @param color.column default \code{NULL}. This is a column in the data.frame
#' passed to the \code{dabest} function. This column will be treated as a
#' \link{factor} and used to color the datapoints in the rawdata swarmplot.
Expand Down Expand Up @@ -100,7 +102,6 @@
#' \code{keyword = value} pairs to \code{ggplot2::geom_line()}. This
#' controls the appearance of the lines plotted for a paired slopegraph.
#'
#' @param ... Signature for S3 generic function.
#'
#'
#' @return A \code{ggplot} object.
Expand Down Expand Up @@ -168,6 +169,10 @@ plot.dabest <- function(x, ...,
sinaplot.params = NULL,
slopegraph.params = NULL ){

#### Check dots are empty ####
# Added in v0.2.2.
ellipsis::check_dots_empty()

#### Check object class ####
if (class(x)[1] != "dabest") {
stop(paste(
Expand Down Expand Up @@ -548,7 +553,7 @@ plot.dabest <- function(x, ...,
func_test <- summary[[func]][2]

rawdata.plot <- rawdata.plot +
# Plot the summary lines for the control group...
# Plot the summary lines for the control group.
ggplot2::geom_segment(
color = "black",
size = horizontal.line.width,
Expand All @@ -557,7 +562,7 @@ plot.dabest <- function(x, ...,
y = func_control,
yend = func_control)) +

# ... and the test group.
# Plot the summary lines for the test group.
ggplot2::geom_segment(
color = "black",
size = horizontal.line.width,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ unpaired_mean_diff <- dabest(iris, Species, Petal.Width,

# Display the results in a user-friendly format.
unpaired_mean_diff
#> DABEST (Data Analysis with Bootstrap Estimation) v0.2.1
#> DABEST (Data Analysis with Bootstrap Estimation) v0.2.2
#> =======================================================
#>
#> Variable: Petal.Width
Expand Down
181,638 changes: 90,822 additions & 90,816 deletions tests/figs/aesthetics/cumming-custom-effect-size-marker.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
181,638 changes: 90,822 additions & 90,816 deletions tests/figs/aesthetics/cumming-custom-effect-size-ylimits.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
181,634 changes: 90,820 additions & 90,814 deletions tests/figs/aesthetics/cumming-custom-groupwidth.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 454b2ae

Please sign in to comment.