superbData looks for CI.mean in the global environment, fails when package is not loaded or only namespace-loaded with requireNamespace
> data(ToothGrowth)
+ superb::superbData(ToothGrowth, BSFactors = c("dose", "supp"),
+ variables = "len")
superb::FYI: The variables will be plotted in that order: dose, supp (use factorOrder to change).
Error in `superbPlot()`:
! superb::ERROR(22): The function CI.mean is not a known function for error bars. Exiting...
# still fails
> requireNamespace('superb')
+ superb::superbData(ToothGrowth, BSFactors = c("dose", "supp"),
+ variables = "len")
Loading required namespace: superb
superb::FYI: The variables will be plotted in that order: dose, supp (use factorOrder to change).
Error in `superbPlot()`:
! superb::ERROR(22): The function CI.mean is not a known function for error bars. Exiting...
# after loading with library, the example works
> library(superb)
Warning message:
package ‘superb’ was built under R version 4.5.2
> data(ToothGrowth)
+ superb::superbData(ToothGrowth, BSFactors = c("dose", "supp"),
+ variables = "len")
superb::FYI: The variables will be plotted in that order: dose, supp (use factorOrder to change).
$summaryStatistics
dose supp center lowerwidth upperwidth
1 0.5 OJ 13.23 -3.190283 3.190283
2 0.5 VC 7.98 -1.964824 1.964824
3 1 OJ 22.70 -2.797727 2.797727
4 1 VC 16.77 -1.799343 1.799343
5 2 OJ 26.06 -1.899314 1.899314
6 2 VC 26.14 -3.432090 3.432090
...
superbData looks for CI.mean in the global environment, fails when package is not loaded or only namespace-loaded with
requireNamespaceFrom a fresh R session:
Environment: