-
Notifications
You must be signed in to change notification settings - Fork 83
Develop #251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Develop #251
Changes from all commits
Commits
Show all changes
83 commits
Select commit
Hold shift + click to select a range
8c503f9
Manage "infer" class more systematically.
echasnovski ce156e9
Update 'RoxygenNote' in 'DESCRIPTION'.
echasnovski ab63dc0
Merge pull request #219 from echasnovski/infer-class
d65e0cf
Test if I can push.
echasnovski ab04e6e
Use {vdiffr} for plot testing. Closes #212.
echasnovski 71b5ee4
Merge pull request #221 from echasnovski/vdiffr
1124d1b
Implement initial "area under the curve" functionality in `shade_p_va…
echasnovski b4e56d8
add GoF test
andrewpbray d449a20
remove unfinished pval part
andrewpbray 0f059bd
refactor to take out parse_variables into a separate function. remove…
andrewpbray b4ace58
insert in parse_variables, change `data` to `x`.
andrewpbray edf73d1
add GoF to chisq_test
andrewpbray 4bd38b3
redo chisq_stat to only use chisq_test
andrewpbray 723911c
Update {vdiffr} tests to use "area under the curve" approach in `shad…
echasnovski 4c7f421
Move `shade_p_value()` tests to separate file.
echasnovski dd38a69
Update `shade_p_value()` documentation.
echasnovski 689a63c
Update files for a clean R CMD CHECK.
echasnovski d160351
Add `shade_p_value()` tests for handling `direction` synonyms.
echasnovski 7f22dfc
Mention "area under the curve" approach in 'NEWS.md' and documentation.
echasnovski 97bdbcc
Attempt to solve test reproducibility problem on r-devel.
echasnovski 15ea3c7
Merge pull request #229 from tidymodels/shade-pval-area
andrewpbray 78a8be4
simplify args
andrewpbray 3a35105
add get_expr
andrewpbray 4e77df2
fix namespace bug
andrewpbray 7fb6ea0
add default args
andrewpbray 7b76feb
fix t_test to use parse_variables
andrewpbray 9beebde
Update README.md
1da3092
Update `shade_ci()` to draw vertical lines from 0 (not from `-Inf`).
echasnovski 85faa38
Rename {vdiffr} expectations for `shade_p_value()` accepting `directi…
echasnovski 2510aeb
Move code and tests for `shade_confidence_interval()` to separate files.
echasnovski 4ee21cb
Update 'NEWS.md'.
echasnovski bb75b3a
Merge pull request #234 from tidymodels/shade_ci-update
andrewpbray 735de6b
fuss w NSE
andrewpbray 3f41b57
extend for nse and documentation
andrewpbray 5765078
adapt chisq tests
andrewpbray 9a00357
solve enquo problem (hopefully()
andrewpbray ebc3559
tnker w tests
andrewpbray 0ca55a2
add more chisq tests
andrewpbray 3f333a3
redo-manual
andrewpbray f6f99d4
merge in develop
andrewpbray 25b918d
recompile by check
andrewpbray de98563
replace the name of the arugment `x` with `data` to conform with base…
andrewpbray f515d6c
fix test
andrewpbray 26f0496
flesh out two sample t test
andrewpbray f1b7af1
roll back arg name to x
andrewpbray 443b285
add tests
andrewpbray 43c727d
add check args for chisq
andrewpbray 4df0b10
revert change
andrewpbray 782bac4
fix test failures
andrewpbray 924ba9e
fix typos
andrewpbray b850092
drag t-test into t-stat
andrewpbray 7bf8386
add more t tests
andrewpbray f85c644
fix pull()
andrewpbray ae4a4c3
add arg documentation
andrewpbray fc35749
update docs
andrewpbray e80e8b6
update for vdiffr
andrewpbray 43927e9
update after sims changed
andrewpbray 4c7d550
add import
andrewpbray bcf4bef
make null hypothesis params explicit
richierocks 48b5fc6
fix silly bugs
richierocks 2a07da7
remove dupe check on null arg
richierocks 3624cc9
typo
richierocks de704f7
tests for bad calls to hypothesize()
richierocks 4d250d7
try adding variable to fix vdiffr failures
andrewpbray 8738090
Merge pull request #241 from tidymodels/goodness-of-fit
andrewpbray 00a4ace
rechecked, vdiffr cases managed
andrewpbray cf40bc3
fix typo
andrewpbray 90cd5b0
change to lower case
andrewpbray b5d6641
fix typos in roxygen
andrewpbray b5d82ce
repair test
andrewpbray 67d9a67
Merge pull request #246 from andrewpbray/develop
andrewpbray a9e9a02
resolve merge conflict
andrewpbray 63ce0e2
add news for v 0.5.0
andrewpbray 4725409
switch evgeni to aut
andrewpbray bfe840e
update vdiffr
andrewpbray fe76479
suppress warning from chisq.test() in chisq_stat()
andrewpbray 55ee98b
suppress warning from chisq.test() when doing a permutation GoF
andrewpbray 2e45f95
fix typo
andrewpbray c3f7d17
Merge pull request #247 from tidymodels/supress-chisq
andrewpbray 02647da
add tolerance to exact tests
andrewpbray 8c00c65
temporarily remove tests that are failing noLD builds
andrewpbray 9c7c5a7
prepare for release
andrewpbray 1b7f4aa
Merge branch 'master' into develop
andrewpbray File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,6 @@ | |
| ^docs* | ||
| ^CONDUCT\.md$ | ||
| ^README\.md$ | ||
| ^NEWS\.md$ | ||
| ^cran-comments\.md$ | ||
| ^_build\.sh$ | ||
| ^appveyor\.yml$ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| #' Add information about confidence interval | ||
| #' | ||
| #' `shade_confidence_interval()` plots confidence interval region on top of the | ||
| #' [visualize()] output. It should be used as \\{ggplot2\\} layer function (see | ||
| #' examples). `shade_ci()` is its alias. | ||
| #' | ||
| #' @param endpoints A 2 element vector or a 1 x 2 data frame containing the | ||
| #' lower and upper values to be plotted. Most useful for visualizing | ||
| #' conference intervals. | ||
| #' @param color A character or hex string specifying the color of the | ||
| #' end points as a vertical lines on the plot. | ||
| #' @param fill A character or hex string specifying the color to shade the | ||
| #' confidence interval. If `NULL` then no shading is actually done. | ||
| #' @param ... Other arguments passed along to \\{ggplot2\\} functions. | ||
| #' @return A list of \\{ggplot2\\} objects to be added to the `visualize()` | ||
| #' output. | ||
| #' | ||
| #' @seealso [shade_p_value()] to add information about p-value region. | ||
| #' | ||
| #' @examples | ||
| #' viz_plot <- mtcars %>% | ||
| #' dplyr::mutate(am = factor(am)) %>% | ||
| #' specify(mpg ~ am) %>% # alt: response = mpg, explanatory = am | ||
| #' hypothesize(null = "independence") %>% | ||
| #' generate(reps = 100, type = "permute") %>% | ||
| #' calculate(stat = "t", order = c("1", "0")) %>% | ||
| #' visualize(method = "both") | ||
| #' | ||
| #' viz_plot + shade_confidence_interval(c(-1.5, 1.5)) | ||
| #' viz_plot + shade_confidence_interval(c(-1.5, 1.5), fill = NULL) | ||
| #' | ||
| #' @name shade_confidence_interval | ||
| NULL | ||
|
|
||
| #' @rdname shade_confidence_interval | ||
| #' @export | ||
| shade_confidence_interval <- function(endpoints, color = "mediumaquamarine", | ||
| fill = "turquoise", ...) { | ||
| endpoints <- impute_endpoints(endpoints) | ||
| check_shade_confidence_interval_args(color, fill) | ||
|
|
||
| res <- list() | ||
| if (is.null(endpoints)) { | ||
| return(res) | ||
| } | ||
|
|
||
| if (!is.null(fill)) { | ||
| res <- c( | ||
| res, list( | ||
| ggplot2::geom_rect( | ||
| data = data.frame(endpoints[1]), | ||
| fill = fill, alpha = 0.6, | ||
| aes(xmin = endpoints[1], xmax = endpoints[2], ymin = 0, ymax = Inf), | ||
| inherit.aes = FALSE, | ||
| ... | ||
| ) | ||
| ) | ||
| ) | ||
| } | ||
|
|
||
| c( | ||
| res, | ||
| list( | ||
| ggplot2::geom_segment( | ||
| data = data.frame(x = endpoints), | ||
| aes(x = x, xend = x, y = 0, yend = Inf), | ||
| colour = color, size = 2, | ||
| inherit.aes = FALSE | ||
| ) | ||
| ) | ||
| ) | ||
| } | ||
|
|
||
| #' @rdname shade_confidence_interval | ||
| #' @export | ||
| shade_ci <- shade_confidence_interval |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Snazzy!
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's all @richierocks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @richierocks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for flagging that bit about plot labels. We'll try to tack that on to the next wave of updates, led by @simonpcouch, focused on documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Looking forward to it. Happy to provide a quick review. Just tag me and I'll let you know a timeline for when I'll be able to get it done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll move it over to an issue and try to assign it to Simon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. I'm not sure why the travis build is taking so long...normally it's like a 5 min job.