partition

0th

Percentile

Patitions an object into different sets

Partitions an object into subsets of length defined in the sep argument.

Keywords
manip
Usage
partition.vector(x, sep, ...)
partition.matrix(x, rowsep, colsep, ...)
Arguments
x

object to be partitioned.

sep

determines how many elements should go into each set. The sum of sep should be equal to the length of x.

rowsep

determins how many rows should go into each set. The sum of rowsep must equal the number of rows in x.

colsep

determins how many columns should go into each set. The sum of colsep must equal the number of columns in x.

arguments used in other methods of partition.

Value

A list of equal length as sep containing the partitioned objects.

See Also

split

Aliases
  • partition
  • partition.vector
  • partition.matrix
Examples
# NOT RUN {
a <- 1:7
partition.vector(a, sep=c(1,3,2,1))
# }
Documentation reproduced from package Hmisc, version 4.1-1, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.