genRandomPar {blockmodeling} | R Documentation |

## The function for generating random partitions

### Description

The function generates random partitions. The function is meant to be called by the function `optRandomParC.`

### Usage

```
genRandomPar(
k,
n,
seed = NULL,
mingr = 1,
maxgr = Inf,
addParam = list(genPajekPar = TRUE, probGenMech = NULL)
)
```

### Arguments

`k` |
Number of clusters (by modes). |

`n` |
Number of units (by modes). |

`seed` |
Seed for generating random numbers (partitions). |

`mingr` |
Minimal allowed group size. |

`maxgr` |
Maximal allowed group size. |

`addParam` |
This has to be a list with the following parameters (any or all can be missing, then the default values (see usage) are used): |

### Value

A random partition in the format required by `optRandomParC`

. If a network has several modes, then a list of partitions, one for each mode.

### Author(s)

Aleš Žiberna

### References

Batagelj, V., & Mrvar, A. (2006). Pajek 1.11. Retrieved from http://vlado.fmf.uni-lj.si/pub/networks/pajek/

*blockmodeling*version 1.1.5 Index]