Skip to content

Commit

Permalink
Merge pull request #28 from ACCLAB/v0.2.0
Browse files Browse the repository at this point in the history
v0.2.0
  • Loading branch information
josesho authored Jan 3, 2019
2 parents efabcb3 + e95ad3b commit c0d9cb3
Show file tree
Hide file tree
Showing 14 changed files with 30,637 additions and 85 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
^Meta$
^doc$
^CRAN-RELEASE$
^.*\.Rproj$
^\.Rproj\.user$
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Meta
doc
.Rproj.user
.Rhistory
.RData
Expand All @@ -6,3 +8,5 @@
.DS_Store
*.DS_Store
inst/doc
# revdevcheck temp folder
revdep
2 changes: 0 additions & 2 deletions CRAN-RELEASE

This file was deleted.

3 changes: 1 addition & 2 deletions 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.1.0
Version: 0.2.0
Authors@R: c(
person("Joses W.", "Ho",
email = "[email protected]", role = c("cre", "aut")),
Expand Down Expand Up @@ -32,7 +32,6 @@ Imports:
cowplot,
dplyr,
ggplot2 (>= 3.0),
grid,
forcats,
ggforce,
ggbeeswarm,
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# dabestr v0.2.0

* This release fixes a bug that plotted the categories alphabetically in Gardner-Altman plots. (# 24).

# dabestr v0.1.0

* First release of dabestr.
18 changes: 9 additions & 9 deletions R/main.R
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,6 @@
#' )
#'
#'
#' # Constructing the confidence intervals on 10000 bootstrap resamples.
#' unpaired_mean_diff_n10000 <- dabest(
#' iris, Species, Petal.Width,
#' idx = c("setosa", "versicolor", "virginica"),
#' paired = FALSE,
#' reps = 10000
#' )
#'
#' # Using pipes to munge your data and then passing to `dabest`.
#' # First, we generate some synthetic data.
Expand All @@ -179,11 +172,11 @@
#'
#'
#' @section References:
#' \href{https://www.jstor.org/stable/2246110}{Bootstrap Confidence Intervals.}
#' \href{https://projecteuclid.org/euclid.ss/1032280214}{Bootstrap Confidence Intervals.}
#' DiCiccio, Thomas J., and Bradley Efron.
#' Statistical Science: vol. 11, no. 3, 1996. pp. 189–228.
#'
#' \href{https://www.crcpress.com/An-Introduction-to-the-Bootstrap/Efron-Tibshirani/p/book/9780412042317}{An Introduction to the Bootstrap.} Efron, Bradley, and R. J. Tibshirani. 1994. CRC Press.
#' \href{https://www.crcpress.com/An-Introduction-to-the-Bootstrap/Efron-Tibshirani/p/book/9780412042317/}{An Introduction to the Bootstrap.} Efron, Bradley, and R. J. Tibshirani. 1994. CRC Press.
#'
#'
#' @importFrom magrittr %>%
Expand Down Expand Up @@ -376,6 +369,13 @@ dabest <- function(

colnames(summaries) <- c(x_quoname, func_quoname)

# Order the summaries by the idx.
summaries[[x_quoname]] <-
summaries[[x_quoname]] %>%
factor(all_groups, ordered = TRUE)

summaries <- summaries %>% dplyr::arrange(!!x_enquo)



#### Assemble only the data used to create the plot. ####
Expand Down
13 changes: 5 additions & 8 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,11 @@
#' # Create a Gardner-Altman estimation plot.
#' plot(unpaired_mean_diff)
#'
#' # Create a Cumming estimation plot instead.
#' plot(unpaired_mean_diff, float.contrast = FALSE)
#'
#'
#' # Comparing versicolor and virginica petal width to setosa petal width.
#' shared_control_data <- dabest(iris, Species, Petal.Width,
#' idx = c("setosa", "versicolor", "virginica"),
#' paired = FALSE
#' idx = c("setosa", "versicolor", "virginica")
#' )
#'
#' # Create a Cumming estimation plot.
Expand Down Expand Up @@ -233,12 +230,12 @@ plot.dabest <- function(x, ...,
}

for.plot <- dplyr::bind_rows(for.plot)

for.plot[[x_quoname]] <-
for.plot[[x_quoname]] %>%
factor(all.groups, ordered = TRUE)
}

for.plot[[x_quoname]] <-
for.plot[[x_quoname]] %>%
factor(all.groups, ordered = TRUE)


#### Compute the Ns. ####
Ns <-
Expand Down
23 changes: 5 additions & 18 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,18 @@
## Resubmission
This is a resubmission. In this version I have:

* Cleaned the LICENSE file. Note that the package is licensed under
the BSD 3-Clause Clear License, which is a variant of the BSD 3-Clause
License that explicitly does not grant any patent rights
<https://choosealicense.com/licenses/bsd-3-clause-clear/>.
It does not seem to be listed in the license templates on CRAN
<https://cran.r-project.org/web/licenses/>.

* Fixed the DOI markup.

* Removed the redundant "in R" from the title.

* Added reference about the plots and methods in the Description field
of DESCRIPTION.
## v0.2.0
This is a update to the package, fixing a bug in the previous release.


## Test environments
* local OS X install, R 3.5.0
* local debian install, R 3.5.1
* local OS X install, R 3.5.2
* local debian install, R 3.5.2
* ubuntu 14.04.5 (on travis-ci, devel and release)
* win-builder (devel and release)


## R CMD check results
There were no ERRORs, WARNINGs, or NOTEs.


## Downstream dependencies
There are currently no downstream dependencies for this package.
11 changes: 2 additions & 9 deletions man/dabest.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions man/plot.dabest.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15,135 changes: 15,135 additions & 0 deletions tests/figs/gardner-altman-plots/gardner-altman-paired-reverse.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 c0d9cb3

Please sign in to comment.