Suggestion: Add alternative uncertainty notation for rvar
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 171
- Forks
- 26
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 3
Description
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!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the rvar output/formatting entry point that currently renders mean ± sd. Check how an R option could select plusminus versus parenthesis notation, then verify that both styles produce the requested output for the example values and that the default remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100