partition | R Documentation |
Partitions an object into subsets of length defined in the sep
argument.
partition.vector(x, sep, ...)
partition.matrix(x, rowsep, colsep, ...)
x |
object to be partitioned. |
sep |
determines how many elements should go into each set. The
sum of |
rowsep |
determins how many rows should go into each set. The
sum of |
colsep |
determins how many columns should go into each set. The
sum of |
... |
arguments used in other methods of |
A list of equal length as sep
containing the partitioned objects.
Charles Dupont
split
a <- 1:7
partition.vector(a, sep=c(1,3,2,1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.