similar to: igraph: Turn multiple edges into weights

Displaying 20 results from an estimated 3000 matches similar to: "igraph: Turn multiple edges into weights"

2017 Aug 28
5
"Improvement with the R code"
Hello, I am trying to implement a formula aij= transition from state S_i to S_j/no of transition at state S_i Code I have written is working with three state {1,2,3 }, but if the number of states become={1,2,3,4,......n} then the code will not work, so can some help me with this. For and some rows of my data frame look like
2017 Aug 28
0
"Improvement with the R code"
Hi, I think you overthought this one a little bit, I don't know if this is the kind of code you are expecting but I came up with something like that: generate_transition_matrix <- function(data, n_states) { #To be sure I imagine you should check n_states is right at this point transitions <- matrix(0, n_states, n_states) #we could improve a little bit here because at
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
2009 Jul 09
3
Looking for recommendations for blocking hacking attempts
Hello: I have been looking into projects that will automatically restrict hacking attempts on my servers running CentOS 5. I think the two top contenders are: DenyHosts - http://denyhosts.sourceforge.net Fail2ban - http://www.fail2ban.org >From what I see, DenyHosts only blocks based on failed SSH attempts whereas Fail2ban blocks failed attempts for other access as well. The main benefit
2010 Jun 28
2
Stacked Histogram, multiple lines for dates of news stories?
Dear colleagues, I have extracted the dates of several news stories from a newspaper data base to chart coverage trends of an issue over time. They are in a data frame that looks just like one generated by the reproducible code below. I can already generate a histogram of the dates with various intervals (months, quarters, weeks years) using hist.Date. However, there are two other
2007 Feb 20
1
Reshape (pivot) question
Hi R-users, I have a data set like this (first ten rows): id patient_id date code class eala ID1564262 1562 6.4.2006 12:00 5555 1 NA ID1564262 1562 6.4.2006 12:00 5555 1 NA ID1564264 1365 14.2.2006 14:35 5555 1 50 ID1564265 1342 7.4.2006 14:30 2222 2 50 ID1564266 1648 7.4.200614:30 2222 2 50 ID1564267 1263 10.2.2006 15:45 2222 2 10 ID1564267 1263 10.2.200615:45 3333 3 10 ID1564269 5646
2008 Dec 26
2
question about SNA in R, thanks!
Dear colleagues, I'm trying to have a look at the Assortative and Disassortative ( http://en.wikipedia.org/wiki/Assortative_mixing) of the network I have. But it seems that the igraph hasn't mentioned that yet. I have to get the in/out degree of the vertices of each edge and calculate the Pearson's Correlation coefficient which seems to be quite a huge task for me. :( So I wonder if
2012 Jul 11
3
Subset based on multiple values
I'm stuck on a seemingly simple problem. I'm trying to subset the data by several numbers and it cuts out half of the rows. Here is the sample code: test <- as.matrix(c(1,1,1,1,3,3,7,7,7,7)) Count <- tapply(test[,1], test[,1], length) # count for each value spp <- unique(test[,1]) Count1 <- as.data.frame(cbind(Count,spp)) Max <- max(Count) Count1$sppMax <-
2001 Mar 16
1
combine dataset
Hi, I have two data sets look like below: ========================== state count1 percent1 CA 19 0.34 TX 22 0.35 FL 11 0.24 OR 34 0.42 GA 52 0.62 MN 12 0.17 NC 19 0.34 state count2 percent2 FL 22 0.35 MN 22 0.35 CA 11 0.24 TX 52 0.62 ========================== How to combine these two data set and make it look like below?
2009 Apr 06
2
Bonpower Crashes Trying Sparse Matrix (Igraph)
Hello All, I have been trying to do bonpow for a while now.Bonpow works for few graphs and for few others it goes out of memory. I did see reply to one of the posting Alph Centrality Crashed in Igraph memory error. The solution in the posting was to use sparse matrix. This is the link of the message. http://lists.gnu.org/archive/html/igraph-help/2008-04/msg00071.html I was able to obtain
2009 Sep 19
2
Counting observations of a combined factor
#I have a dataset with two factor. I want to combine those factors into a single factor and count the number of data values for each new factor. The following gives a comparable dataframe: a <- rep(c("a", "b"), c(6,6)) b <- rep(c("c", "d"), c(6,6)) df <- data.frame(f1=a, f2=b, d=rnorm(12)) df # I use the 'interaction' function to combine
2002 Jun 18
3
FINDNEXT problem, w2k and linux smbfs
I have inconsistent directory listing on share mounted on linux from windows 2k. Some time not all files appear in the directory listing. If reading directory listing multiple times (60-200 times) files listed originally would have one or two files missing in one of consecutive lists. The same problem appear as well if you are making backup of Windows files from multiple directories, there are
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 <-
2008 May 09
3
For Social Network Analysis-Graph Analysis - How to convert 2 mode data to 1 mode data?
Hi, Does anyone know of a package in R that has a function to convert network data (e.g. an adjacency matrix or ) from 2-mode to 1-mode? I am conducting social network analysis. I know that Pajek has this function under Net --> Transform --> 2-mode to 1-mode --> Rows. I have searched the documentation under packages 'sna', 'network', 'igraph', and
2009 Oct 29
1
operation with if/else on a dataframe
Hi to all, I have this dataframe (I show the first six rows) >head(table) A R Fold.Change P.Value Count1 Count2 1 ENSRNOE00000000002_at 0 1.13 0.60 1 1 2 ENSRNOE00000000009_at 0 -1.04 0.73 3 3 3 ENSRNOE00000000020_at 0 -1.08
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.
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 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
2004 Jul 07
1
Histograms, density, and relative frequencies
R-users, I have been using R for about 1 year, and I have run across a couple of graphics problem that I am not quite sure how to address. I have read up on the email threads regarding the differences between density and relative frequencies (count/sum(count) on the R list, and I am hoping that someone could provide me with some advice/comments concerning my approach. I will admit
2008 Mar 05
4
vertex labels in igraph from adjacency matrix
I am getting some unexpected results from some functions of igraph and it is possible that I am misinterpreting the vertex numbers. Eg., the max betweenness measure seems to be from a vertex that is not connected to a single other vertex. Below if my code snippet: require(igraph) my.graph <- graph.adjacency(adjmatrix = my.adj.matrix, mode=c("undirected")) most.between.vert <-