Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

matrix2graph

Matrix2Graph and Graph2Matrix


Description

Creates a graph of class graphMCP from a given transition matrix or vice versa.

Usage

matrix2graph(m, weights = rep(1/dim(m)[1], dim(m)[1]))

graph2matrix(graph)

Arguments

m

A transition matrix.

weights

A numeric for the initial weights.

graph

A graph of class graphMCP.

Details

The hypotheses names are the row names or if these are NULL, the column names or if these are also NULL of type H1, H2, H3, ...

If the diagonal of the matrix is unequal zero, the values are ignored and a warning is given.

Value

A graph of class graphMCP with the given transition matrix for matrix2graph. The transition matrix of a graphMCP graph for graph2matrix.

Author(s)

Kornelius Rohmeyer rohmeyer@small-projects.de

Examples

# Bonferroni-Holm:
m <- matrix(rep(1/3, 16), nrow=4)
diag(m) <- c(0, 0, 0, 0)
graph <- matrix2graph(m)
print(graph)
graph2matrix(graph)

gMCP

Graph Based Multiple Comparison Procedures

v0.8-15
GPL (>= 2)
Authors
Kornelius Rohmeyer [aut, cre], Florian Klinglmueller [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.