path_weights

0th

Percentile

Utility functions to manipulate pairwise information.

These functions perform calculations on edge matrices containing pairwise information.

Keywords
graphs
Usage
path_weights(edgew, path,  symmetric = TRUE,edge.index=edge_index(edgew),...)
path_cis(edgew, path,edge.index=edge_index(edgew),ci.pos=FALSE)
edge2dist(edgew, edge.index=edge_index(edgew))
dist2edge(d)
edge_index(x, order="default")
Arguments
edgew

A Matrix (or vector) whose ith row (or element) has weights for pair indexed by pair in row i of edge.index. For edge2dist, edgew should be a vector.

path

Vector of indices into rows of edgew.

symmetric

If TRUE edge weights are interpreted as symmetric.

edge.index

A 2-column matrix with each row giving indices for corresponding weight in edgew.

ci.pos

If TRUE, all CIs are mu(max) - mu(min), otherwise mu(right) - mu(left).

d

A dist or matrx of distances.

order

If "low.order.first" or "scagnostics", lists lowest index pairs first, otherwise lists pairs starting with 1, then 2 etc.

x

An edgew matrix or vector, or a positive integer.

...

Ignored

Details

path_weights - Returns matrix of path weights so that the ith row of result contains weights for indices path[i], path[i+1]

path_cis - Returns matrix of path confidence intervals so that the ith row of result contains intervals for mean-path[i] - mean-path[i+1]

edge2dist - Returns a dist, containing elements of edgew.

dist2edge - Returns a vector of edge weights.

edge_index -A generic function. Returns a 2-column matrix with one row for each edge. Each row contains an index pair i,j. If order is "low.order.first" or "scagnostics", lists lowest index pairs first - this is the default ordering for class scagdf, otherwise lists pairs starting with 1, then 2 etc

nnodes - Here edgew contains edge weights for a complete graph; returns the number of nodes in this complete graph.

see overview

• path_weights
• path_cis
• edge2dist
• dist2edge
• edge_index
• nnodes
Examples
# NOT RUN {
require(PairViz)

s <- matrix(1:40,nrow=10,ncol=4)

edge2dist(s[,1])

path_weights(s,1:4)
path_weights(s,eseq(5))

fm1 <- aov(breaks ~ wool + tension, data = warpbreaks)
tuk <- TukeyHSD(fm1, "tension")[[1]]

# Here the first argument (weight matrix) can have number of columns

path_weights(tuk,c(1:3,1))

# Here the first argument (weight matrix) should have an odd number of columns-
# the first is the mean difference, other column pairs are endpoints of CIs

path_cis(tuk[,-4],c(1:3,1))

# }

Documentation reproduced from package PairViz, version 1.3.2, License: GPL-2

Community examples

Looks like there are no examples yet.