Description Usage Arguments Details Value Examples
Flip a matrix vertically and horizontally before recombining into a new large matrix
1 | caleidoscope(m, odd = TRUE)
|
m |
a matrix |
odd |
logical; should the resulting matrix have odd dimensions? |
Three copies of m
will be made. One flipped horizontally, one flipped
vertically, and one flipped both horizontally and vertically. Then they are recombined
with the original matrix in the upper right corner, and the flipped copies in the
upper left, lower righ and lower left corners, respectively.
A matrix of either 2× or 2× - 1 the number of rows and columns of the input matrix.
1 2 3 4 5 | caleidoscope(matrix(1:4, 2), odd=FALSE)
image(caleidoscope(1:9 %o% 1:9))
image(caleidoscope(matrix(runif(180*200)^2, 180)), col=rainbow(256, start=0.58))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.