cutToNgrp: Cut numeric vector to n groups (ie convert to factor)
Description
This function is a more elaborate version of cut for cutting a the content of a
numeric vector 'x' into a given number of groups, taken from the length of 'lev'.
Besides, this function provides the group borders/limits for convention use with legends.
This function returns a list with $grouped telling which element of 'x' goes in which group and $legTxt with gourp-borders for convenient use with legends
Arguments
x
numeric vector
lev
(character or numeric), the length of this argument tells the number of groups to be used for cutting
NAuse
(logical) include NAs as separate group
silent
(logical) suppress messages
debug
(logical) additional messages for debugging
callFrom
(character) allows easier tracking of messages produced