divide | R Documentation |
This is a helper to prepare lapply/mclapply operations on vectors, or matrices.
divide(.Object, n) ## S4 method for signature 'matrix' divide(.Object, n) ## S4 method for signature 'vector' divide(.Object, n)
.Object |
object to split up |
n |
number of objects |
a list of objects of the same class as the input object
split_into
in the text2vec
package offers a similar, and faster function for vectors
divide(1:10, n = 3) M <- matrix(1:20, ncol = 2, byrow = TRUE) divide(M, n = 3) divide(M, n = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.