Displaying 20 results from an estimated 100 matches similar to: "Converting edgelist to symmetric matrix"
2007 Dec 20
2
factor manipulation: edgelist to a matrix?
Hello All,
I have had considerable bad luck with attempting the following with for
loops. Here is the problem:
# Suppose we have a data.frame with the following data, which can be
considered a type of edgelist (for those with networks backgrounds):
#
# V1 V2
# 1 A
# 1 A
# 1 B
# 2 A
# 3 C
# 3 A
# 3 C
# 3 B
#
# I want the output of the function to produce a matrix, such that #each
factor of
2003 Apr 22
1
Social Network Analysis and R
I'm interested in computing densities of a number of small ego-centred or local
networks. I've installed both the R program and the sna package. My next task
is importing the data into R.
Our data was entered into Spss in an edgelist format in which each case
specifies the link between an alter and an ego. For example:
10101 10102 1
10101 10103 3
10102 10104 2
10201 10203
2008 Jun 27
1
Problem in conditional looping
Respected All,
I am writing a program in R and facing some problem with applying "if statment".
Program first draw random numbers from bivariate normal distribution
then compute variable say Pi and Pij from that sample and
then further computation
.....
.....
.....
In some samples Pij is appearing with negitive sign and ultimately
resulted in an negative variance estimator.
2008 Jul 03
1
Problem in applying conditional looping
Respected All,
I hope you are enjoying good health, I am tring to write a program in R but
could not be very sucessful. My program draws random sample form bivariate
normal distribution and then compute a variable PIJ. For certian samples
some entries of variable PIJ is apearing as negative, which result
in negative variance estimator. I want to introduce a loop in my program
that verify the each
2008 May 26
1
Listing all possible samples of Size two form Large Population
Respected All,
I need some efficient program or package to draw all possible samples
of size two without replacement. I am using "combinat" package to list
all possible samples but it hangs my computer for larger populations
say 10,000 (i.e. 49995000 all possible samples). I wish to even work
for larger populations then this and replicate this procedure for many
times. Kindly can anyone
2011 Jan 05
1
unique limited to 536870912
Hi
I am using R with igraph to analyze an edgelist that is greater than the said amount. Does anyone know a way around this?
Thanks
Inder
2011 May 18
1
data network format and grouping analysis
Hi everyone,
I have a dataset of friendship with this format:
ego alter
4746 1 2
9742 1 3
14738 1 NA
4747 2 NA
9743 2 3
14739 2 1
4748 3 13
9744 3 5
14740 3 14
4749 4 NA
9745 4 NA
14741 4 NA
4750 5 NA
9746 5 13
14742 5 10
4751 6 12
9747 6 7
...
NA means that individuals don't select any
2007 Oct 08
2
graph or svn
Hello all,
I'm having a spot of trouble. I have made a very nice distance
matrix from some comparison calculations. However, the matrix is 3096 x
3096, so it's relatively large. Currently I'm using the svn package as
it seems to work for my data. The graph package errors and says the
"adjacency matrix must be symmetric for undirected graphs". I though
3096 x 3096 was
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
2008 Mar 26
2
Latentnet Data Import
Hello everone,
I am a computer science researcher in the UK - and have a quick question regarding importing data into R and more specifically latentnet.
I am trying to import data such as a text file containing: (This is based on the Sampson data set)
-----------
Network attributes:
vertices = 3
directed = TRUE
hyper = FALSE
loops = FALSE
multiple = FALSE
total edges=
2011 Jul 06
1
superimposing network graphs
Dear all,
I have a undirected network (g), representing all the sexual relationships that ever existed in a model community.
I also have a directed edgelist (e) which is a subset of the edgelist of g. e represents the transmission pathway of HIV.
Now I would like to superimpose the picture of the sexual relationships with arrows in a different colour, to indicate where in the network HIV was
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 Dec 04
1
R igraph clusters component
Hi R-users,
I'm using igraph for an undirected graph.
i used clusters() igraph function to know the component size(subgraphs) as shown bellow:
c <-clusters(g)
# component sizes
size <- sort(c$csize, decreasing=TRUE)
cat("Top 20 cluster of the graph","\n")
for (i in 1:20)
{
cat(i," size:",size[i] ,"\n")
}
Can anyone help how to extract the
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
2012 Aug 14
2
igraph: Turn multiple edges into weights
Dear all,
I have some network data - about 300 vertices and several thousand edges. I
am looking for a way to turn multiple edges into weights of the edges. I
looked around and - surprisingly? - haven't found anything. Is there an
easy way to do this?
Best, Jonas
[[alternative HTML version deleted]]
2010 Dec 21
3
Link prediction in social network with R
Dear R users
I'm a novice user of R and have absolutely no prior knowledge of social network analysis, so apologies if my question is trivial. I've spent alot of time trying to solve this on my own but I really can't so hope someone here can help me out. Cheers!
The dataset:
I'm trying to predict the existance of links (True or False) in a test set using a training set. Both
2012 Nov 22
1
error message in Linkcomm package
Dear All,
Some of the functions in Linkcomm return an error:
unused argument(s) (v = V(x$igraph))
Although I follow the guidance in the manual a number of the functions
return this error. The igraph vector is an edgelist.
Many thanks for any guidance.
Best,
Nick
2008 Nov 27
1
Welcome to the "R-help" mailing list (Digest mode)
Hi friends,
Is there anyone who happened to import data set in the "DL" format into R
for further analysis?
In the package of "network", there's only a method named "read.paj()".
So now, I have to get the dl file from the original data set, and use UCINET
to convert it to .net file. It's too complicated.
:(
In the package of "igraph", edgelist is
2008 Dec 28
1
how to get degree according to the name of the node?
Hi all,
I have two networks for the same group of the users.
I want to compare individual's degree in different networks.
But how could I get the degrere of the nodes according to its name?
When I use degree(g1), I could only get a vector of the degree of each node.
But when I turn to g2, I don't know whose degree it is so I can't match it
with the degree(g2).
Now I'm trying to
2011 Sep 01
2
Automatic Recoding
I have a text file full of numbers (it's a edgelist for a graph) and I would like to recode the numbers as they are way too big to work with. So for instance the following:
676529098667 1000198767829
676529098667 100867672856227
676529098667 91098726278
676529098667 98928373
1092837363526 716172829
would become:
0 1
0 2
0 3
0 4
5 6
i.e. all 676529098667 would become