Quick fix for bug introduced by #433 #434
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a quick fix for a bug introduced by PR #433. Illustration of the bug (the RDS file is available here):
At the current state of
master
(commit 5717fd4), the last line fails with the errorWith this PR, the last line does not fail anymore.
It is only a quick fix because as a longer-term objective, it would probably be better to replace the role of attribute
nobs_orig
by an attribute that refers to the number of (possibly latent) response categories. The reason is that subsetting the rows of an augmented-rows matrix (or the elements of an augmented-length vector) is only legal in terms of the observations (individuals), not in terms of the (possibly latent) response categories. So the number of (possibly latent) response categories should always stay the same, in contrast to the number of observations.str()
(and possibly other functions) may not adhere to the subsetting convention we are requiring, but even in those cases, it should be ok to assume the number of (possibly latent) response categories not to change (forstr()
, this is indeed correct). I'm sorry that thenobs_orig
thing seems to have been a bad design choice from my side in PR #322.