Skip to content

Commit

Permalink
Revert 7fe1b7f
Browse files Browse the repository at this point in the history
Since it causes a failure in ggplot2
  • Loading branch information
hadley committed Nov 5, 2019
1 parent eaf962e commit bb91c06
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
3 changes: 0 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@
* `boxcox_trans()` no longer throws an error when given NA values
(@sflippl, #181).
* `sqrt_trans()` no longer returns an inverse for values outside of its
domain (#214).
## Other bug fixes and minor improvements
* scales now uses the farver package for colour manipulation instead of a
Expand Down
2 changes: 1 addition & 1 deletion R/trans-numeric.r
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ sqrt_trans <- function() {
trans_new(
"sqrt",
"sqrt",
function(x) ifelse(x < 0, NA_real_, x ^ 2),
function(x) x ^ 2,
domain = c(0, Inf)
)
}
Expand Down
4 changes: 0 additions & 4 deletions tests/testthat/test-trans.r
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@ test_that("Transformed ranges silently drop out-of-domain values", {
r2 <- trans_range(sqrt_trans(), -1:10)
expect_that(r2, equals(sqrt(c(0, 10))))
})

test_that("inverse of trans_sqrt() returns NA for values outside of range", {
expect_equal(sqrt_trans()$inverse(-2), NA_real_)
})

0 comments on commit bb91c06

Please sign in to comment.