generateRandomData: Generate random data for hasse function

Description Usage Arguments Value Examples

View source: R/hasse.R

Description

This function generates random data for hasse function.

Usage

1
generateRandomData(nrNodes, minGraphs = 1, density = 0.5)

Arguments

nrNodes

Numer of nodes (0 < nrNodes).

minGraphs

Minimal number of graphs to generate (0 < minGraphs <= nrNodes).

density

Value which determines number of edges and shape of graphs (density in [0.0; 1.0]).

Value

nrNodes x nrNodes matrix.

Examples

1
2
3
4
5
6
7
data0_0 <- generateRandomData(15, 2, 0.0)
data0_5 <- generateRandomData(15, 2, 0.5)
data1_0 <- generateRandomData(15, 2, 1.0)

hasse(data0_0)
hasse(data0_5)
hasse(data1_0)

Example output

Loading required package: Rgraphviz
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Loading required package: grid

hasseDiagram documentation built on June 10, 2021, 9:10 a.m.