diff --git a/R/geom-.r b/R/geom-.r index 9aad085b..73b957ad 100644 --- a/R/geom-.r +++ b/R/geom-.r @@ -609,11 +609,6 @@ Geom <- gganimintproto("Geom", if(any(repNA)){ to.rep[repNA] <- FALSE } - origNA <- is.na(l$data)[, xy.col.vec, drop=FALSE] - warnNA <- repNA & !origNA - if(any(warnNA)){ - warning("NA found in code for handling infinite values. Typically this means that user should change -Inf to 0 when using scale_log10 etc") - } row.vec <- row(to.rep)[to.rep] xy.col.df[to.rep] <- extreme.vec[row.vec] } diff --git a/tests/testthat/test-compiler-errors.R b/tests/testthat/test-compiler-errors.R index bfc06a70..8681ccaf 100644 --- a/tests/testthat/test-compiler-errors.R +++ b/tests/testthat/test-compiler-errors.R @@ -99,11 +99,11 @@ test_that("warn for -Inf but not NA input to scale_log10", { viz_neg_Inf <- get_viz(-Inf) expect_warning({ animint2dir(viz_neg_Inf, open.browser=FALSE) - }, "NA found in code for handling infinite values. Typically this means that user should change -Inf to 0 when using scale_log10 etc") + }, "NaNs produced") viz_NA <- get_viz(NA) expect_no_warning({ animint2dir(viz_NA, open.browser=FALSE) - }, "NA found in code for handling infinite values. Typically this means that user should change -Inf to 0 when using scale_log10 etc") + }) }) test_that("warn no key for geom_text with showSelected=duration var", {