Skip to content

Commit

Permalink
remove test from deleetdk because of undeclared non-CRAN dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkowa committed Feb 23, 2017
1 parent 3be9c4d commit 7eb268b
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions tests/test_data_frame.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,4 @@ library(VIM)
test_data = data_frame(a = c(1, 2, 3, NA, 5), b = c(2, 1, NA, 5, 5), c = c(NA, 2, 1, 4, 3))
identical(as.data.frame(irmi(test_data,noise=FALSE)),irmi(as.data.frame(test_data),noise=FALSE))
identical(as.data.frame(kNN(test_data,addRandom=FALSE)),kNN(as.data.frame(test_data),addRandom=FALSE))
identical(as.data.frame(hotdeck(test_data,ord_var="a")),hotdeck(as.data.frame(test_data),ord_var="a"))

# test factors ------------------------------------------------------------
#error happened with a data_frame with factors with 1 levels because they did not drop automatically
#as base data.frame does.
#We check for this error using a customized iris.

library(testthat)
#devtools::install_github("deleetdk/kirkegaard")

bad_iris = iris[1:50, ]
bad_iris$Species = factor(bad_iris$Species)
expect_error(bad_iris %>% kirkegaard::miss_add_random() %>% irmi)
identical(as.data.frame(hotdeck(test_data,ord_var="a")),hotdeck(as.data.frame(test_data),ord_var="a"))

0 comments on commit 7eb268b

Please sign in to comment.