Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Displayr/flipData
Browse files Browse the repository at this point in the history
  • Loading branch information
mwmclean committed Sep 6, 2017
2 parents 28427ef + ff81ec8 commit df92e8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/testthat/test-tidyrawdata.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ test_that("TidyRawData: fails when weights or subset wrong length",
expect_error(TidyRawData(x, subset = wgt > 5))
})

wgt = c(NA, 0, rep(1, 100), rep(NA, 225))

test_that("TidyRawData: missing values in weights cause data to be filtered",
{
wgt = c(NA, 0, rep(1, 100), rep(NA, 225))
out <- suppressWarnings(TidyRawData(x, weights = wgt))
expect_equal(nrow(out), 100)
expect_equivalent(out, x[!is.na(wgt) & wgt, ]) # expect_equivalent(out, x[3:102, ])
Expand Down

0 comments on commit df92e8d

Please sign in to comment.