Open jpryby opened 4 months ago
To add to this, there is no protection in the current version of the function nor this fix that allows the reuse of an ID number across two individuals, even though that is how NONMEM would interpret separate blocks of the same ID number. See below for the simtab output of what I mean (with TABLE breaks for each subproblem); this is two simulations from a dataset containing 3 subjects, as NONMEM would see it.
TABLE 1 |
---|
ID 1 1 1 2 2 2 1 1 1 | TABLE 2 | ID 1 1 1 2 2 2 1 1 1
To me, this is a rarer edge-case than the one the fix is addressing, but may be worth mentioning in the documentation.
The current irep() depends upon the input x already being sorted within each repeat, but NONMEM does not have this requirement. The proposed change works whether or not x is sorted this way.
Created on 2024-06-24 with reprex v2.0.2