Low-level helper functions for computing sums, cumulative sums, and reverse cumulative sums within strata groups, as well as matrix double-indexing.
sumstrata(x, strata, nstrata)cumsumstrata(x, strata, nstrata)
revcumsumstrata(x, strata, nstrata)
revcumsum(x)
matdoubleindex(x, rows, cols, xvec = NULL)
mdi(x, ...)
Numeric vector of the same length as x (or modified matrix).
numeric vector (or matrix for matdoubleindex).
integer vector of strata indices (0-based).
number of distinct strata.
row indices for matdoubleindex.
column indices for matdoubleindex.
optional values to assign at indexed positions.
additional arguments (for mdi).
Klaus K. Holst, Thomas Scheike