check_zeros <- function(samples, val) {
# browser()
samples <- rowid_to_column(samples)
bad <- slice(samples, which(rowSums(samples == 0) > 1))
if (nrow(bad) == 0) return(select(samples, -rowid))
else {
good <- setdiff(samples, bad)
adj_bad <- as_tibble(val * (bad == 0) + bad)
union(good, adj_bad) %>%
arrange(rowid) %>%
select(-rowid)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.