eq_single <- function(z, d) {
PAutilities::paired_equivalence_test(
d[ ,z[1]], d[ ,z[2]], "comparison",
scale = "relative", relative_region_width = 0.10
) %>%
.[["results"]] %>%
data.frame(
x = z[1], y = z[2], .,
stringsAsFactors = FALSE,
row.names = NULL
)
}
eq_wrapper <- function(d) {
names(d) %>%
.[grepl("kcal", .)] %>%
combn(2, simplify = FALSE) %>%
lapply(eq_single, d = d) %>%
do.call(rbind, .)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.