-
Notifications
You must be signed in to change notification settings - Fork 63
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
reorder passed info when setting new pop and strat #207
Comments
How about preserving the |
This could definitely be possible. @romunov, I don't think it would be wise to change the order of the data to mach the newly-assigned pop. I DO think it would be a good idea to add the indNames to the unnamed vectors. I also think think it would be a good idea to issue a warning if the population or the strata were in the wrong order.
|
I would also add a unit test for this. |
good point!
- [ ] unit tests
|
One more thing that should be considered with this: Some monte carlo tests involve shuffling the data by using: pop(x) <- sample(pop(x)) Under the proposed changes, this would do absolutely nothing, which would effectively break the above procedure. The remedy for this is to recommend users to do the following with monte carlo tests: pop(x) <- unname(sample(pop(x))) Perhaps one way to get around this would be to add a pop(x, check.names = TRUE) <- myPop when setting a new population? I'm still a bit on the fence about it because, on the one hand, you don't break things, but on the other hand, it's harder to enforce good practices. Additionally, there is something slightly unsettling about having an unordered population factor floating around.... but then again, there could be a method called |
Yes I think we want to keep the default behaviour of
I am not sure if we want the last use case. If not, I would rename the |
If
foo
is named in these operations:then it would make sense to check the names against
indNames(x)
and:@zkamvar what do you think?
The text was updated successfully, but these errors were encountered: