context("project function")
library(taxstats)
library(magrittr)
library(dplyr)
test_that("Columns do not vanish", {
testH <- as.integer(sample(1:4, size = 1))
y <- project(sample_file_1314, h = testH)
all_zero <- function(x){
all(abs(x) < .Machine$double.eps)
}
cols_zero <- sapply(grattan:::select_which_(y, is.numeric), all_zero)
expect_false(any(cols_zero), info = paste0("h = ", testH, ". Col:", names(cols_zero)[cols_zero]))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.