create_partitions: Given a vector length adn the size of each parition, create a...

View source: R/callingCardsFunctions.R

create_partitionsR Documentation

Given a vector length adn the size of each parition, create a vector which represents those partitions.

Description

There may be one more partition of size less than the equally divided parts. eg if the vector length is 14 and the desired partitions are size 3, then there will be 4 partitions of length 3 and one of length 2, 1 1 1 2 2 2 3 3 3 4 4 4 5 5.

Usage

create_partitions(vector_length, equal_parts = 100)

Arguments

vector_length

the total lenght of the partition vector

equal_parts

how large should each partition be?

Value

a vector of vector_length divded into equal_parts with possibly one additional vector of size less than equal_parts.


BrentLab/brentlabRnaSeqTools documentation built on Aug. 20, 2023, 9:22 a.m.