Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ not supply sufficient information to calculate an observed statistic
`direction` argument in `get_p_value()` and `shade_p_value()` (#355)
- Fixed bug in `calculate()` for `stat = "t"` to allow for handling
columns named `x`
- Fixed bug in `shade_p_value` where the package would erroneously warn when
`stat = "diff in props"` and one of the variables was a factor with more than
two levels.
- Various bug fixes and improvements to internal consistency

## Other
Expand Down
4 changes: 2 additions & 2 deletions R/set_params.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ set_params <- function(x) {
# Two sample proportions (z distribution)
# Parameter(s) not needed since standard normal
if (
(length(levels(response_variable(x))) == 2) &
(length(levels(explanatory_variable(x))) == 2)
(length(unique(response_variable(x))) == 2) &
(length(unique(explanatory_variable(x))) == 2)
) {
attr(x, "theory_type") <- "Two sample props z"
} else {
Expand Down