Function that takes an index number and gives which sequential set of N it is in
whichSetOfN.Rd
Finds the sequential number of sets of data when reading fixed size multirow blocks of rows.
Background
I am quite often importing data with a multirow nested structure so I may have data from participants with different ID values and with different occasions per participant and then some fixed number of rows of data per person per occasion. For one set of data I might have say four rows of medication data per participant per occasion per actual medication prescribed. I use whichSetOfN(row_number(), 4) to tell me the sequential number of the prescription this row (found by row_number() inside a group_by()).
See also
Other utility functions:
convertClipboardAuthorNames()
,
fixVarNames()
,
getAttenuatedR()
,
getCorrectedR()