cutToNgrp | R Documentation |

`cutToNgrp`

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.

```
cutToNgrp(x, lev, NAuse = FALSE, callFrom = NULL)
```

`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 |

`callFrom` |
(character) for better tracking of use of functions |

list with `$grouped`

telling which element of '`x`

' goes in which group and `$legTxt`

with gourp-borders for convenient use with legends

`cut`

```
set.seed(2019); dat <- runif(30) +(1:30)/2
cutToNgrp(dat,1:5)
plot(dat,col=(1:5)[as.numeric(cutToNgrp(dat,1:5)$grouped)])
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.