assignBlocks: Assign set numbers to a vector of values.

Description Usage Arguments Value Examples

View source: R/fcn_misc.R

Description

Each set has size set_size (internally optimized using correctSetSize), holding values from 'values'. This gives n such sets and the return value is just the set index for each value.

Usage

1
assignBlocks(values, set_size = 5, sort_values = TRUE)

Arguments

values

Vector of values

set_size

Number of distinct values allowed in a set

sort_values

Before assigning values to sets, sort the values?

Value

Vector (same length as input) with set numbers

Examples

1
2
3
4
 #library(PTXQC)
 assignBlocks(c(1:11, 1), set_size = 3, sort_values = FALSE)
 ## --> 1 1 1 2 2 2 3 3 3 4 4 1
 

PTXQC documentation built on Feb. 9, 2018, 6:08 a.m.