Learn R Programming

qgraph (version 1.5)

qgraph.svg: qgraph.svg

Description

IMPORTANT NOTE: RSVGTipsDevice is a 32-bit only package, so SVG functionality is not available in 64bit versions of R.

This function makes a series of SVG images with hyperlinks to each other using the RSVGTipsDevice package (Plate, 2009). The arguments are the same as qgraph except that some arguments can be assigned a vector with multiple options.

Usage

qgraph.svg( input, layout=c( "circular", "spring" ), 
	graph=c( "association", "concentration", "factorial" ),	
	cut=c( 0, 0.2, 0.3, 0.5), filename="qgraph", title="qgraph output",	
	nfact=round(ncol(input)/2,0),	tooltips=NULL,	... )

Arguments

input

A weights matrix (correlation matrix is recommended). See qgraph

layout

The layout of the graph, see qgraph, unlike qgraph it is not possible to assign a specific layout.

graph

The graph to be made based on the correlation matrix. See qgraph

cut

The cutoff score. See qgraph

filename

The name of the SVG files.

title

The title that will be printed at the top of the pictures

nfact

The number of factors that will be used in the EFA that makes the factorial graph. See qgraph

tooltips

A vector with for each node the tooltip to be used.

...

Additional arguments that are passed to qgraph

Details

This function works the same as qgraph except that the arguments 'layout', 'graph' and 'cut' can be given a vector with multiple options. The RSVGTipsDevice package (Plate, 2009) is used to accomplish this. A SVG picture will be created for each combination of the arguments 'layout', 'graph' and 'cut', with hyperlinks between them

References

Sacha Epskamp, Angelique O. J. Cramer, Lourens J. Waldorp, Verena D. Schmittmann, Denny Borsboom (2012). qgraph: Network Visualizations of Relationships in Psychometric Data. Journal of Statistical Software, 48(4), 1-18. URL http://www.jstatsoft.org/v48/i04/.

Plate, T. <tplate@acm.org> and based on RSvgDevice by T Jake Luciani <jakeluciani@yahoo.com> (2009). RSVGTipsDevice: An R SVG graphics device with dynamic tips and hyperlinks. R package version 1.0-1.

See Also

qgraph

Examples

Run this code
# NOT RUN {
#### VISUALIZE CORRELATION MATRIX ###
eta=matrix(rnorm(200*5),ncol=5)
lam=matrix(0,nrow=100,ncol=5)
for (i in 1:5) lam[(20*i-19):(20*i),i]=rnorm(20,0.7,0.3)
eps=matrix(rnorm(200*100),ncol=100)
Y=eta%*%t(lam)+eps

tooltips=paste("item",1:100)
groups=list(1:20,21:40,41:60,61:80,81:100)
names(groups)=paste("Factor",LETTERS[1:5])
# Run qgraph:
qgraph.svg(cor(Y),groups=groups,tooltips=tooltips,vsize=3)
# }

Run the code above in your browser using DataLab