plotnetwork: Correlation network plot

Description Usage Arguments Details Value Author(s) References Examples

Description

This function could be used to plot correlation network, with less than 15 sites (recommended). The points lie in a circle with lines connected. Blue lines indicate negative values and the red ones the positive ones.

Usage

1
2
3
4
5
6
7
plotnetwork(datainput, interval = 8, xlim = c(-2.5,5), 
ylim=c(-3.2,3.2), lty = c(1,2,3,4,4,3,2,1,5), value = "r", 
legendx = 3, legendy = 0, right = 1.2, intcept = 0.22, 
left = 0.35, linelength = 0.3, cex = 3, lwd = 1.5, 
show.legend = TRUE, digits = 2, dit = 1.2, 
number.label = TRUE, text.label = TRUE, 
linecol = c("red", "black"), ...)

Arguments

datainput

The correlation matrix, ex. Pearson's correlation matrix

interval

Number of intervals of the values, indicating how to partition the range of input data

xlim

The x range of the plot. The users need not to change it.

ylim

The y range of the plot. The users need not to change it.

lty

Line styles used in connection lines for each interval. Must have number of elements + 1.

value

Value of the matrix, should be a character, will used in legend.

legendx

Legend position x.

legendy

Legend position y.

right

Legend position adjustment parameter.

intcept

Legend position adjustment. can be used to specify the row space between each line for the legend.

left

Legend position adjustment parameter.

linelength

Line length in the legend.

cex

Point size for each circle.

lwd

Line width for each circle.

...

Other arguments to be passed from.

show.legend

Whether the legend should be drawn.

digits

Number of digits displayed in legend.

dit

Distance of text labels from each corner.

number.label

Whether the number label should be drawn.

text.label

Whether the text label should be drawn.

linecol

Colours of the lines specified. The positive correlation will be drawn in the first colour specified.

Details

This function could be used to plot the pairwise connections between less than 20 sites ( above 20 is not recommended since there would be too many connections).

The lines will be in red or blue, according the sign of the value of association. Users can adjust the line style and legends based on their requirements.

Value

Correlation network plots.

Author(s)

Jinlong Zhang jinlongzhang01@gmail.com

References

None

Examples

1
2
3
4
5
6
7
8
9
data(testdata)
spmatrix <- data2mat(testdata)
result <- sp.pair(spmatrix)
plotnetwork(result$Pearson)

plotnetwork(result$Pearson, linecol = c("orange", "blue"),
number.label = FALSE)

title("Pearson Correlation Network")

Example output



spaa documentation built on May 2, 2019, 9:44 a.m.