File: genRandomPar.Rd

package info (click to toggle)
r-cran-blockmodeling 1.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 912 kB
  • sloc: ansic: 2,024; f90: 952; sh: 13; makefile: 5
file content (43 lines) | stat: -rw-r--r-- 1,941 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/genRandomPar.R
\name{genRandomPar}
\alias{genRandomPar}
\title{The function for generating random partitions}
\usage{
genRandomPar(
  k,
  n,
  seed = NULL,
  mingr = 1,
  maxgr = Inf,
  addParam = list(genPajekPar = TRUE, probGenMech = NULL)
)
}
\arguments{
\item{k}{Number of clusters (by modes).}

\item{n}{Number of units (by modes).}

\item{seed}{Seed for generating random numbers (partitions).}

\item{mingr}{Minimal allowed group size.}

\item{maxgr}{Maximal allowed group size.}

\item{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):\cr
"genPajekPar" - Should the partitions be generated as in Pajek (Batagelj & Mrvar, 2006). If \code{FALSE}, all partitions are selected completely at random while making sure that the partitions have the required number of clusters. \cr
\code{probGenMech} - Here the probabilities for 4 different generating mechanisms can be specified. If this is not specified, the value is set to \code{c(1/3, 1/3, 1/3, 0)} if \code{genPajekPar} is \code{TRUE} and to \code{c(0, 0, 0, 1)} if \code{genPajekPar} is \code{FALSE}. The first 3 mechanisms are the same as implemented in Pajek (the second one has almost all units in only one cluster) and the fourth is completely random (from uniform distribution).}
}
\value{
A random partition in the format required by \code{\link{optRandomParC}}. If a network has several modes, then a list of partitions, one for each mode.
}
\description{
The function generates random partitions. The function is meant to be called by the function \code{\link{optRandomParC}.}
}
\references{
Batagelj, V., & Mrvar, A. (2006). Pajek 1.11. Retrieved from http://vlado.fmf.uni-lj.si/pub/networks/pajek/
}
\author{
\enc{Aleš Žiberna}{Ales Ziberna}
}
\keyword{cluster}