-
Notifications
You must be signed in to change notification settings - Fork 103
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
Added random sampling to Probability keyboard in Calculator dialog #7991
Added random sampling to Probability keyboard in Calculator dialog #7991
Conversation
@derekagorhom good, @anastasia-mbithe can you peer review this? |
@derekagorhom that's a very good start indeed. Well done. I did say you could use this example to also learn more that would help you generally. When implementing I need you to reflect that your job includes thinking hard on how it will be used - so sometimes improving on what I have written as the issue. Also, making sure you understand the issue well. |
@rdstern i made the changes, can you please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@derekagorhom that is better - and quick too. But I have deduced that you can't have tried your code. You should not expect your tester to be the first person to try the different bits of code you write. I would prefer you to take a bit longer, but be confident that you tested yourself, and critically, before expecting others. Perhaps you were still going to do this and I am testing too soon?
a) My evidence is particularly the poisson key, which doesn't work. I am sure you can discover and correct the error.
b) The uni_integer is a bit more complicated, but try with your default settings and (for example) the survey data, which has 36 observations. That will give an error, because 5 does not go into 36. Then you will discover that you need to swap n and size round.
c) And the sample also doesn't work. There you need to use size, where you have n, and you will have x = , ready for the user, usually to include a variable. (You could alternatively have a number there, and then it is effectively the same as uni_integer.)
Progress - I knew you would be able to combine this task with learning a lot - both about what to do, and also how to do it. I assume you tried it and found it didn't work. Then look at the reference documentation on that command to make the correction - which I thought I had mentioned above. If it did work for you, it is because your data frame was of length a multiple of 5 and you should have noticed that the values keep repeating. It gave an error for me, because the worksheet was of length 36. Changing to |
Thank you @rdstern, i have made the changes to |
@derekagorhom you are not learning to work as carefully as I hoped. Did you really try the sample key? Can you see what is wrong in your code now? |
hello @rdstern, i have made the changes, can you please check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lloyddewit I am at last ok with this. So over to you.
fixes #7953
@rdstern , @N-thony this PR is ready for review