posterior
posterior copied to clipboard
Suggestion: Add alternative uncertainty notation for rvar
While the current rvar notation of mean ± sd is straightforward, I think it might be beneficial to offer alternative notations. I've found the mean(sd) style to be quite popular in some contexts, e.g. in physics and chemistry.
To give a bit of context, the R package errors offers a similar functionality to rvar, but it is only based on mean and standard deviation:
> library(posterior)
> library(errors)
> set.seed(19725654)
> rnorm(100, mean = 5, sd=10) -> x
> mean(x)
[1] 5.892738
> sd(x)
[1] 11.32585
> errors::set_errors(mean(x), sd(x))
6(10)
> posterior::rvar(x)
rvar<100>[1] mean ± sd:
[1] 5.9 ± 11
Considering this, would it be possible to introduce an R option, say rvar.uncertainty.notation? This could let users choose between the current plusminus style and the alternative parenthesis notation.
Thanks for considering!