Description Usage Arguments Details Value Examples
A function to decrease the size of a matrix while attempting to preserve the original values.
1 | condense_matrix(m, fun = median)
|
m |
A |
fun |
A function for summarizing four values that condenses them down to
one value. Default is |
This function can be used for image manipulation and is included for
the purpose of making mazes from images. PNG images can be read in as
arrays via png::readPNG
and if the image is too big, this funtion
can help get it down to a more manageable size.
A matrix with dimensions half the size of the original matrix, where each value is a summary of the four corresponding values in the original.
1 2 | m <- outer(1:4, 1:6)
condense_matrix(m)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.