similar to: Import graph object

Displaying 20 results from an estimated 20000 matches similar to: "Import graph object"

2009 Sep 11
2
Graph visualization
Hello, I am working with graph and adjacency matrix, the package 'graph' seems to be appropriate for this. An example in the package > mat <- rbind(c(0, 0, 1, 1), + c(0, 0, 1, 1), + c(1, 1, 0, 1), + c(1, 1, 1, 0)) > rownames(mat) <- colnames(mat) <- letters[1:4] > graph1 <- new("graphAM", adjMat=mat) > graph1 A
2009 Mar 25
1
Weighted Graph Link strength ( I am making mistake please help)
Hello R experts, I went through R mailing,Nabble R.I could not find solution.Can someone help me. I have undirected Graph. Here is an example of spreadsheet I have( Unique 3559 Nodes) snippet of 4 rows. Node1 Node2 Weights 1 2 5 2 3 30 2 4 30 1 4 5 3 4 30 1 3 2 I created a program reading the csv and created a Adjacency matrix.From the adjacency matrix I created graph.I am not sure the
2011 Sep 19
1
Binary optimization problem in R
Dear all, I would like to solve a problem similar to a multiple knapsack problem and am looking for a function in R that can help me. Specifically, my situation is as follows: I have a list of n items which I would like to allocate to m groups with fixed size. Each item has a certain profit value and this profit depends on the type of group the item is in. My problem is to allocate the items
2002 Apr 18
5
Two problems
Hello! Two questions: 1: I have to import a matrix of adjacency from a file of a software that is not R (for example "bloc notes" of Windows). The problem is that the matrix is not in the explicit form as 0 1 1 1 0 0 1 0 0 but it is a scattered matrix where in each row there are two nodes that have a direct path. The matrix is a b a c b a c a For example, the first row
2012 Aug 14
1
Help needed in reading matlab files
Dear users, I am stucked with a programming problem: I am trying to download a squared adjacency matrix from matlab with only 0 or 1. Doing it without a loop at first, I get an error message that is, I think, related to the "mat_adj<-readMat(pathnames_adj)" line. Did anybodz encouter already that problem? If so, do I need to change anything in my code in order it not to be
2011 May 13
6
Powerful PC to run R
Dear all, I'm currently running R on my laptop -- a Lenovo Thinkpad X201 (Intel Core i7 CPU, M620, 2.67 Ghz, 8 GB RAM). The problem is that some of my calculations run for several days sometimes even weeks (mainly simulations over a large parameter space). Depending on the external conditions, my laptop sometimes shuts down due to overheating. I'm now thinking about buying a more
2004 Apr 27
3
reading a "sparse" matrix into R
I have a 47k x 47k adjacency matrix that is very sparse (at most 30 entries per row); my textual representation therefore is simply an adjacency list of connections between nodes for each row, e.g. node connections A B C D E B A C D C A E D A E A F F E G H I'd like to import this into a dataframe of node/connection (character/vector-of-characters) pairs. I've experimented with
2011 Apr 12
2
Testing equality of coefficients in coxph model
Dear all, I'm running a coxph model of the form: coxph(Surv(Start, End, Death.ID) ~ x1 + x2 + a1 + a2 + a3) Within this model, I would like to compare the influence of x1 and x2 on the hazard rate. Specifically I am interested in testing whether the estimated coefficient for x1 is equal (or not) to the estimated coefficient for x2. I was thinking of using a Chow-test for this but the Chow
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
2009 Jul 06
4
[LLVMdev] LLVM Graph Representation
I'm developing the ABCD algorithm for LLVM, and I will need to store some information as a digraph. I was thinking of a list of adjacency, implemented with a map<Instruction, Set<Node>>. The node would have an Instruction and a value. I opted for map and set, because I will create the graph once and will search on it a bunch of times, and will never remove a node. Is there
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
2016 Apr 16
1
Social Network Simulation
Dear all, I am trying to simulate a series of networks that have characteristics similar to real life social networks. Specifically I am interested in networks that have (a) a reasonable degree of clustering (as measured by the transitivity function in igraph) and (b) a reasonable degree of degree polarization (as measured by the average degree of the top 10% nodes with highest degree divided by
2013 Jan 22
2
Approximating discrete distribution by continuous distribution
Dear all, I have a discrete distribution showing how age is distributed across a population using a certain set of bands: Age <- matrix(c(74045062, 71978405, 122718362, 40489415), ncol=1, dimnames=list(c("<18", "18-34", "35-64", "65+"),c())) Age_dist <- Age/sum(Age) For example I know that 23.94% of all people are between 0-18 years, 23.28%
2011 Mar 26
1
Effect size in multiple regression
Dear all, is there a convenient way to determine the effect size for a regression coefficient in a multiple regression model? I have a model of the form lm(y ~ A*B*C*D) and would like to determine Cohen's f2 (http://en.wikipedia.org/wiki/Effect_size) for each predictor without having to do it manually. Thanks, Michael Michael Haenlein Associate Professor of Marketing ESCP Europe Paris,
2007 Aug 28
4
Nodes & edges with similarity matrix
Hello, I apologise if someone has already answered this but I searched and googled but didn't find anything. I have a matrix which gives me the similarity of each item to each other. I would like to turn this matrix into something like what they have in the graph package with the nodes and edges. http://cran.r-project.org/doc/packages/graph.pdf . However I cannot find a method to
2010 Nov 11
2
predict.coxph and predict.survreg
Dear all, I'm struggling with predicting "expected time until death" for a coxph and survreg model. I have two datasets. Dataset 1 includes a certain number of people for which I know a vector of covariates (age, gender, etc.) and their event times (i.e., I know whether they have died and when if death occurred prior to the end of the observation period). Dataset 2 includes another
2010 Jul 25
1
Equivalent to go-to statement
Dear all, I'm working with a code that consists of two parts: In Part 1 I'm generating a random graph using the igraph library (which represents the relationships between different nodes) and a vector (which represents a certain characteristic for each node): library(igraph) g <- watts.strogatz.game(1,100,5,0.05) z <- rlnorm(100,0,1) In Part 2 I'm iteratively changing the
2011 Jul 15
2
Convert continuous variable into discrete variable
Dear all, I have a continuous variable that can take on values between 0 and 100, for example: x<-runif(100,0,100) I also have a second variable that defines a series of thresholds, for example: y<-c(3, 4.5, 6, 8) I would like to convert my continuous variable into a discrete one using the threshold variables: If x is between 0 and 3 the discrete variable should be 1 If x is between 3
2011 Aug 13
3
Adjacency Matrix help
I have created an adjacency matrix but have not been able to figure something out. I need to put zeros on the diagonal of the adjacency matrix. For instance, location (i,i) to equal 0. Please help. Thanks -- View this message in context: http://r.789695.n4.nabble.com/Adjacency-Matrix-help-tp3740946p3740946.html Sent from the R help mailing list archive at Nabble.com.
2012 Aug 22
3
help
Hi, As a beginner in R, I need some help on a programming problem which, I guess, will seem trivial to you: I am doing some Network analysis in which I need to calculate some metrics for all the weeks I have (each week the network evolves in terms of number of nodes etc...) For exemple, I need to calculate the degrees of the nodes each weak, and to repeat it in a loop for all the weeks ( for