Description Usage Arguments Details Value Author(s) Examples
plotdetailed_Rgraphviz
uses Rgraphviz to plot a graph containing activations and inhibitions. Input is an
adjacency matrix with activation edge represented by a 1, inhibition by a 2.
1 2 3 4 5 | plotdetailed_Rgraphviz(phi,weights=NULL,main="",stimuli=NULL,
layoutType = "dot", fontsize=20)
get.labels(phi)
get.arrowhead(phi)
get.arrowtail(phi)
|
phi |
Adjacency matrix. The network to be plotted. |
weights |
Optional matrix of edge weights. |
main |
Optional character string containing main title for the plot. |
stimuli |
List of input stimuli. Are marked as red filled nodes in the plot. |
layoutType |
The graphviz layout for drawing the network. |
fontsize |
Fontsize of text in the plot. |
get.labels
, get.arrowhead
and get.arrowtail
are helper functions for
the plot construction and usually not called directly.
The stimuli
list describes the input stimuli or inhibitions. Each of these external treatment
nodes are drawn as red nodes in the graph. The format of the list should be:\
Example: Assume two treatments EGF
and X
, a data matrix data:
EGF_1 | EGF_1 | EGF_2 | EGF_2 | EGF&X_1 | EGF&X_2 | EGF&X_2 | EGF&X_2 | |
EGF | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
X | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
AKT | 1.45 | 1.8 | 0.99 | 1.6 | 1.78 | 1.8 | 1.56 | 1.58 |
The stimuli list should be in the format:
stimuli <- list(c(EGF=1),c(EGF=1,X=2))
,
i.e. each element in the list corresponds to a treatment. Each treatment is a named numeric vector
describing the row indices of the treatments in the data matrices.
none
Christian Bender
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
library(ddepn)
mat <- matrix(sample(c(0,1,2),25,replace=TRUE), nrow=5,ncol=5,
dimnames=list(LETTERS[1:5],LETTERS[1:5]))
weights <- matrix(sample(c(1:25),25,replace=TRUE), nrow=5,ncol=5,
dimnames=list(LETTERS[1:5],LETTERS[1:5]))
stimuli <- list(list(A=1))
plotdetailed_Rgraphviz(mat,weights,"Some random graph",stimuli,layoutType="dot")
plotdetailed_Rgraphviz(mat,weights,"Some random graph",stimuli,layoutType="neato")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.