ecl-logo Documentation

PartitionRemainder

PartitionRemainder[list,n]lists

partitions list into nonoverlapping sublists of lenth n with remaining items that don't devide evenly into a final sublist.

PartitionRemainder[list,n,d]lists

generates overlapping sublists with offset d.

Details

    Input
    Output
    General Options

Examples

Basic Examples  (3)

The function breaks lists into evenely length sublists length 'n' with remaining items that don't devide evenly appended in a final sublist:

An offset can be provided to generate sublists with overlapping elements of length 'n' at an offset of 'd':

If 'n' divides evenly into the length of the list, the function behaves like Partition:

Options  (1)

NegativePadding  (1)

The NegativePadding Option can be used to seperatly partition out elements from the front of the list:

Attributes  (1)

Listable  (1)

The function is listable by 'n' and 'd':