Skip to content

Commit

Permalink
fix a few tests, namespace dplyr::row_number call in vis_miss to avoi…
Browse files Browse the repository at this point in the history
…d a dplyr warning
  • Loading branch information
sckott committed Aug 1, 2018
1 parent 90cc69c commit b726f35
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/vis_miss.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ vis_miss <- function(x,

d <- x.na[row_order_index , ] %>%
as.data.frame %>%
dplyr::mutate_(rows = ~ row_number()) %>%
dplyr::mutate_(rows = ~ dplyr::row_number()) %>%
# gather the variables together for plotting
# here we now have a column of the row number (row),
# then the variable(variables),
Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test-ncdc_plot.r
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ test_that("ncdc_plot returns the correct class", {
p <- ncdc_plot(out)

expect_is(p, "ggplot")
expect_is(p$mapping$x, "name")
expect_is(p$mapping$x, "quosure")
expect_is(p$mapping$x, "formula")
expect_named(p$mapping, c("x", "y"))
})
2 changes: 1 addition & 1 deletion tests/testthat/test-vis_miss.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
context("vis_miss")

test_that("Valid ggplot object is produed",{
test_that("Valid ggplot object is produced",{
monitors <- c("ASN00003003", "ASM00094299")
weather_df <- meteo_pull_monitors(monitors)
out <- vis_miss(weather_df)
Expand Down

0 comments on commit b726f35

Please sign in to comment.