Displaying 20 results from an estimated 6000 matches similar to: "Characteristic Path length calculation"
2011 May 03
3
Watts Strogatz game
Hi,
I have a erdos-renyi game with 6000 nodes and probability 0.003.
g1 = erdos.renyi.game(6000, 0.003)
How to create a Watts Strogatz game with the same probability.
g1 = watts.strogatz.game(1, 6000, ?, ?)
What should be the third and fourth parameter to this argument.
--
View this message in context: http://r.789695.n4.nabble.com/Watts-Strogatz-game-tp3491922p3491922.html
Sent from the R
2008 Jul 11
2
network
Hello
I am a relatively new user of R and am struggling to use the 'network' package. I have a correlation matrix (produced using 'cor'), and want to draw a network where each item showing correlation above a threshold (say 0.5) is joined by a green line, and each item showing correlation below a threshold (say -0.5) is joined by a red line. Does anyone have any hints of how to
2012 Aug 15
3
per-vertex statistics of edge weights
I have a graph with edge and vertex weights, stored in two data frames:
--8<---------------cut here---------------start------------->8---
vertices <- data.frame(vertex=c("a","b","c","d"),weight=c(1,2,1,3))
edges <-
2012 May 13
2
Help with V function in igraph
I am using the code below to output some network measures:
central_social <- data.frame(V(s641_social)$name, indegree_social,
outdegree_social, incloseness_social, outcloseness_social,
betweenness_social, eigen_social)
and I get the following error:
Error in Re(z) : non-numeric argument to function
I know this has to do with V but I cannot figure out what is wrong.
s641-social is a graph
2011 Oct 19
3
RFC: 'igraph' package update and backward compatibility
Dear R developers,
I am seeking advice on some $subject matter.
My package will have an update soon, that is not backward compatible
with the current version. It will likely break much of the existing
code. Many (~50) packages depend on 'igraph' and they, too, will most
probably break with the new version.
My intended solution is, that I create a snapshot of the current
package, under
2007 May 09
3
Removing a list of Objects
Hi,
I have a simple beginner's question on removing a list of
objects. Say I have objects C243.Daily1, C243.Daily2...C243.Daily5 in my
workspace. I'd like to remove these without using rm five times.
So I write.
> a <- list(paste("C243.Daily",sep="",1:5))
> rm(a)
Obviously this wouldn't work, as it would only remove the object a.
But is there any way
2012 Jun 02
1
igraph and igraph0
Could someone tell me the difference between igraph and igraph0?
I searched the CRAN web site, but cannot find an explantion of the differences.
Thanks, Alan
[[alternative HTML version deleted]]
2011 Sep 14
1
Questons about 'igraph' package
Hi,
I am using 'igraph' to make some plots. The problem I got is that I don't
know how to label the nodes with gene names.
My sample code:
## suppose I have 100 gene (nodes) ##
---------------------------------------------------------------------------
graph <- set.vertex.attribute(graph, "color",
value=c(rep(c('green','red'),50)))
graph <-
2011 Nov 22
3
On-demand importing of a package
Dear All,
in some functions of my package, I use the Matrix S4 class, as defined
in the Matrix package.
I don't want to depend on Matrix, however, because my package is
perfectly fine without Matrix, most of the functionality does not need
Matrix. Matrix is so included in the 'Suggests' line.
I load Matrix via require(), from the functions that really need it.
This mostly works
2006 Feb 15
1
power law
Dear list,
Does anyone know how to fit the power law distribution?
I have the empirical distribution and would like to check whether it fits
power law (with the power estimated from the data).
Any hints are appreciated
Best regards
Galina
[[alternative HTML version deleted]]
2012 May 29
1
community finding in a graph and heatplot
Hi everyone,
I am using the fastgreedy.community function to get the $merges matrix and the $modularity vector. This serves my purpose of testing modularity of my graph. But I am "greedy" to plot the heat map and dendrrogram based on the $merges dendogram matrix. I know that heatplot does the graphics part but I am not sure if the dendogram generated by the heatplot will match the one
2008 Feb 11
4
Conditional rows
Hi,
Given a simple example, test <- matrix(c(0.1, 0.2, 0.1, 0.2, 0.1, 0.1, 0.3,
0.1, 0.1), 3, 3)
How to generate row indexes for which their corresponding row values are
less than or equal to 0.2 ? For this example, row 2 and 3 are the correct
ones.
Thanks
[[alternative HTML version deleted]]
2011 Aug 10
1
igraph - designing graph plot by attributes
Hi,
I'm working on some social networks and I managed to create the graphs with labels and edges weight, but I would also like to change the size of the vertices according to the age of the persons in the network and the shape according to the gender. Now for the age, I have people with ages between 20 and 78, and I would like to have 4 categories (sizes): 20-35, 36-50, 50-65, >65. I have
2009 Apr 06
5
Search for a graph package - see link
Hi to all,
does anybody knows whether there is a package to plot those
http://www.equine-science.de/temp/graph.jpg
graphs.
the thickness of the points and/or the lines should be represent the
numbers of behaviours
With kind regards Knut
2012 Jul 31
1
Subgraph isomorphism using vertex labels
Hi all,
I want to find all the mappings of one graph in another graph, based on
their vertex labels
Is there any way to do this in igraph based on vertex labels.
(as far as i know Igraph allows the subgraph isomorphism based only on
vertex and edge colors)
Eg:
graph 1:
x(1) x(2)
x(2) y(3)
y(4) x(1)
z(5) x(2)
graph 2:
x(1) y(2)
# the brackets contain the corresponding vertex ids
i would like my
2011 Sep 29
1
plot.igraph
I am having trouble plotting one of my graphs (think graph theory graph with
edges and vertices, not scatterplots or histograms). For some pairs of
vertices, I want multiple edges to be visible in my graph. As an example of
this, in my script below, I want two edges to be visible from vertex 1 and
vertex 9 (among some others) yet when I plot it, only one edge is visible.
2011 Mar 28
2
Questions about 'igraph' package.......
I am using 'igraph' package to make some graphs of 'gene-gene interaction'.
I can get a data.frame which has three columns.
gene1 gene2 pvalue
AGT MLR 1.2e-04
MLR 11BHSD1 1.71e-05
IFG2 11BHSD2 2.2e-07
. . .
. . .
. . .
AGTR1 NPPA
2011 Aug 05
1
matrix into vector with vertex names
Using Igraph, I create shortest paths, then convert the matrix into
three column vectors - "vertex1", "vertex2", "shortestpath" - as the
code below shows.
#code for generating shortest path matrix and creating a 3 columns
from an igraph graph object "y"
y_s<-shortest.paths(y, weights = NULL)
y_s <- melt(y_s)[melt(upper.tri(y_s))$value,] #Step 2: this
2011 Apr 15
1
Can't use attributes from gml file in Cytoscape
Hello,
I am exporting a graph in "gml" format from igraph 0.5.5. When I open the
file in Cytoscape v.2.7 I can't map the color attribute that I assign to the
graph when I export it from igraph. Could anyone help me in this?
Thanks.
--
Warm Regards,
Sandeep Amberkar
BioQuant,BQ26,
Im Neuenheimer Feld 267,
D-69120,Heidelberg
Tel: +49-6221-5451354
[[alternative HTML version
2012 Apr 23
1
Add attributes to igraph vector by name, not index
Hi,
So I've been figuring out how to use igraph in R and like it for it's speed
and simplicity. Now I have a graph built from an edgelist where vectors have
a $name attribute. I have another dataframe with attributes tied to a
vector ID, which is the same as the $name attribute of vectors represented
in the graph.
How can I iterate over the graph by V(g)$name and do