Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixed argument naming causes problem on rtrunc #74

Closed
wleoncio opened this issue Feb 2, 2022 · 0 comments
Closed

Mixed argument naming causes problem on rtrunc #74

wleoncio opened this issue Feb 2, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@wleoncio
Copy link
Member

wleoncio commented Feb 2, 2022

Naming all arguments except n works fine:

r$> rtrunc(10, mean = 45, sd = 12, a = 50, family = "gaussian")                           
 [1] 50.49646 55.30235 57.44640 57.04836 63.30309 70.77076 54.10051 56.77301 55.77369
[10] 58.90156

Naming none also works fine:

r$> rtrunc(10, 45, 12, 50, family = "gaussian")                                           
 [1] 51.11625 50.25457 60.52160 61.72959 53.50454 66.66784 54.50252 51.34266 54.16256
[10] 56.92976

But naming just some causes validateFamilyParms() to incorrectly determine what the parameters are:

r$> rtrunc(10, 45, 12, a = 50, family = "gaussian")                                       
Error in validateFamilyParms(family, parms) : 
  The {, } parameter set does not match the normal family. Expected set of parameters: {mean, sd}. Please change the family to match the expected parameters or use a different family.

r$> rtrunc(10, 45, 12, b = 60, family = "gaussian")                                       
Error in validateFamilyParms(family, parms) : 
  The {, } parameter set does not match the normal family. Expected set of parameters: {mean, sd}. Please change the family to match the expected parameters or use a different family.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant