igraphmask: Mask function for igraph::plot.igraph() to visualize a...

Description Usage Arguments Details Value Examples

Description

igraphmask is an input mask for the plot.igraph() function of the package igraph. plot.igraph() creates graph plots based on bivariate relations. See ?igraph for further info. igraphmask allows to get a nice, basic graph plot as a png-file that is directly saved to the file system. It doesn't allow to define specific plot settings.

Usage

1
2
igraphmask(reltable, mypath, w = 3000, h = 3000,
  colorvector = c("red"))

Arguments

reltable

list of bivariate relations (as produced by varnastats::reltable())

mypath

file.path where the plot file should be stored

mypath <- file.path("~/path/to/my/directory/",paste("myfilename", ".png", sep = ""))

w

width of the resulting graphic file in px

default = 3000

h

width of the resulting graphic file in px

default = 3000

colorvector

string vector with colour values to mark certain vertices

default = c("red")

Details

For graph layout the fruchterman.reingold.grid algorithm is used.

Value

graphic file of a graph plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
testmatrixrand <- data.frame(
   matrix(base::sample(0:1,400,replace=TRUE), nrow=20, ncol=20)
)

testcorr <- corrmat(testmatrixrand, "lambda", chi2limit = 0.1, dim = 1)
testrel <- reltable(testcorr)

testpath <- file.path(".",paste("testfile", ".png", sep = ""))

igraphmask(testrel, testpath, w = 1000, h = 1000)

nevrome/varnastats documentation built on May 9, 2019, 10:43 a.m.