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

Pass p parameter explicitly in "character,MgsaSets" function #9

Merged
merged 3 commits into from
Apr 3, 2017
Merged

Pass p parameter explicitly in "character,MgsaSets" function #9

merged 3 commits into from
Apr 3, 2017

Conversation

gokceneraslan
Copy link
Contributor

p parameter cannot be set for the function with "character, MgsaSets" signature. See #7 (comment) and #7 for more details.

p parameter cannot be set for the function with "character, MgsaSets" signature. See #7 (comment) and #7 for more details.
@gokceneraslan
Copy link
Contributor Author

I'm not sure which default of p parameter to use. In some functions it's defined as:

p=seq(1 ,min(20,floor(length(sets)/3)), length.out=10)/length(sets)

and in others as

p=seq(min(0.1, 1/length(sets)), min(0.3, 20/length(sets)), length.out=10)

Second one was the default for character,MgsaSets so I kept it as is. You can reproduce the bug via following code:

nrow(mgsa(c("A", "B"), new("MgsaSets", sets=list(set1 = LETTERS[1:3], set2 = LETTERS[2:4])), p=0.4)@pPost)
# [1] 10

nrow(mgsa(c("A", "B"), list(set1 = LETTERS[1:3], set2 = LETTERS[2:4]), p=0.4)@pPost)
# [1] 1

@sba1
Copy link
Owner

sba1 commented Apr 3, 2017 via email

@gokceneraslan
Copy link
Contributor Author

I added the test case as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants