thin.matrix | R Documentation |
Return discard all but every k'th row of a matrix.
ThinMatrix(mat, thin)
mat |
The matrix to be thinned. |
thin |
The distance between kepts lines from mat. The larger the number the fewer lines are kept. |
The bigger the value of thin
the more thinning that gets done.
For example, thin = 10
will keep every 10 lines from mat
.
The matrix mat, after discarding all but every thin
lines.
Steven L. Scott steve.the.bayesian@gmail.com
m <- matrix(1:100, ncol = 2)
ThinMatrix(m, thin = 10)
## [,1] [,2]
## [1,] 10 60
## [2,] 20 70
## [3,] 30 80
## [4,] 40 90
## [5,] 50 100
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.