Description Usage Arguments Value Note Examples
applies the matrix function with nrow to a list before using apply with a function
1 | matrix_apply(x, nrow, fun, ...)
|
x |
a 1d list of data |
nrow |
how many rows to put the list into |
fun |
the function to apply() to the matrix after creating it |
... |
Any additional arguments for the function provided |
a list from using the apply function on the new matrix
length of new list must be evenly divisible by nrow. This function was built to simplify some code in TeaSet
1 2 | test_data <- 1:16
matrix_apply(test_data, nrow = 4, fun = sum)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.