Dear R community, I'd like to poll your opinions and ideas about the arguments of a possible R function:
Suppose you're working with the variates of some population; for instance the variates `species`, `island`, `bill_len`, `bill_dep`, `body_mass`, etc. of the `penguins` dataset <https://cran.r-project.org/package=basepenguins>.
Suppose there's a package that allows you to calculate conditional probabilities of single or joint variates; for example
Pr( bill_len > 40, species = 'Adelie' | bill_dep < 16, body_mass = 4200)
and note in particular that this probability refers to intervals/tails ("bill_len > 40") as well as to point-values ("body_mass = 4200").
In fact the crucial point here is that with this function you can inquiry about the probability of a point value, "=", or about a cumulative probability, ">" or "<", or mixtures thereof, as you please.
Now what would be the "best" way to input this kind of choice as an argument to the function? Let's say you have the following two input ways:
**A: indicate the request of a cumulative probability in the variate name:**
```
Pr(
Y = list('bill_len>' = 40, species = 'Adelie'),
X = list('bill_dep<' = 16, body_mass = 4200)
)
```
**B: indicate the request of a cumulative probability in a separate function argument:**
```
Pr(
Y = list(bill_len = 40, species = 'Adelie'),
X = list(bill_dep = 16, body_mass = 4200),
tails = list(bill_len = '>', bill_dep = '<') # or +1, -1 instead of '>', '<'?
)
```
Any other ideas? Feel free to comment :) See <https://pglpm.github.io/inferno/reference/Pr.html> for a clearer idea about such a function.
Thank you so much for your help!
