Learn R Programming

qgraph (version 0.4.0)

qgraph.svg: qgraph.svg

Description

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( adj, 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(adj)/2,0),	tooltips=NULL,	... )

Arguments

adj
An adjacency 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

https://sites.google.com/site/qgraphproject Plate, T. and based on RSvgDevice by T Jake Luciani (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
#### 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