Standardise output names among functions ecx, nec, nsec
dbarneche opened this issue · comments
Diego Barneche commented
These functions have no common output naming structure.
For example (needs to install version from dev)
library(bayesnec)
library(testthat)
nec4param <- pull_out(manec_example, model = "nec4param")
nec4 <- nec(nec4param, prob_vals = c(0.5, 0.3, 0.7))
expect_equal(names(nec4), c("50%", "30%", "70%"))
which is different from
nsec4 <- nsec(ecx4param, prob_vals = c(0.5, 0.3, 0.7), sig_val = 0.05)
expect_equal(names(nsec4), c("ec_0.05_Q50", "ec_0.05_Q30", "ec_0.05_Q70"))
and
ecx4 <- ecx(ecx4param, prob_vals = c(0.5, 0.3, 0.7), ecx_val = 20)
expect_equal(names(ecx4), c("ec_20_Q50", "ec_20_Q30", "ec_20_Q70"))
It might be cleaner to adopt the names starting with "Q"
and perhaps add the e.g. "ec_*"
tags as an attribute?
Also make sure to update the tests/vignettes/paper accordingly.
Diego Barneche commented