View source: R/extractIndlPeriod.R
extractIndlPeriod | R Documentation |
Instead of vectors, vecIndls and vecPeriods can also be matrices, in which case the (i, j)-th element of the output is M[vecIndls[i, j], vecPeriods[i, j]].
extractIndlPeriod(M, vecPeriods, vecIndls = NULL)
M |
n x T matrix from which we want to extract elements. |
vecPeriods |
vector corresponding to the column numbers of the elements we want to extract. Can also be a constant, it will then be constant for all elements of vecIndls. NAs are passed on to the output. |
vecIndls |
vector corresponding to the row numbers of the elements we want to extract. Can also be a constant, it will then be constant for all elements of vecPeriods. Default is all rows, once, in order (the vector 1:n). |
If one is a vector and the other a matrix, the vector is interpreted as column vector standing for a matrix constant on each row (for vecIndls) or as a row vector standing for a matrix constant for each column (for vecPeriods).
If vecPeriods and vecIndls are vectors, returns the vector whose i-th line is given by M[vecIndls[i], vecPeriods[i]]. If either is a matrix, returns the matrix whose (i, j)-th element of the output is M[vecIndls[i, j], vecPeriods[i, j]].
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.