> > Hello All, > Please help me with this problem.I have been having this problem for over a month now and I could not find any information.I later realised that error is with MATRIX package.
I am working on graph object using IGRAPH version 0.5.2-2 package & wanted to do Bonacich Power. What I have is undirected GRAPH. This is my graph object. The file 'Bonacich Power.RData' (1.5 MB) is available for download at < http://dropbox.unl.edu/uploads/20090522/7a0d0313f21fd6a8/Bonacich%20Power.RData > Graph size *Vertices: 20924 Edges: 146938 Directed: FALSE No graph attributes. Vertex attributes: name. No edge attributes. * computer Configuration *WIndows XP service Pack 3 .0 GB RAM* I am using SPARSE matrix to solve the problem This is the code I use to obtain bonpower using Sparse Matrix & alternatively the code is in the following website http://igraph.wikidot.com/r-recipes#toc6 *bonpow.sparse <- function(graph, nodes=V(graph), loops=FALSE, exponent=1, rescale=TRUE, tol=1e-07) {* * ## remove loops if requested * * ## sparse adjacency matrix d <- get.adjacency(graph, sparse=TRUE)* * ## sparse identity matrix id <- spMatrix(vcount(graph), vcount(graph), i=1:vcount(graph), j=1:vcount(graph), x=rep(1, vcount(graph))) id <- as(id, "dgCMatrix")* * ## solve it ev <- solve(id - exponent * d, tol=tol) %*% degree(graph, mode="all")* * if (rescale) { ev <- ev/sum(ev) } else { ev <- ev * sqrt(vcount(graph)/sum((ev)^2)) }* * ev[as.numeric(nodes) + 1] }* ** I realised that the error is in Matrix Package *Error: cannot allocate vector of size 3.3 Gb In addition: Warning messages: 1: In solve(id - exponent * d, tol = tol) : Reached total allocation of 1535Mb: see help(memory.size) 2: In solve(id - exponent * d, tol = tol) : Reached total allocation of 1535Mb: see help(memory.size) 3: In solve(id - exponent * d, tol = tol) : Reached total allocation of 1535Mb: see help(memory.size) 4: In solve(id - exponent * d, tol = tol) : Reached total allocation of 1535Mb: see help(memory.size)* ** sessionInfo() R version 2.9.0 (2009-04-17) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] Matrix_0.999375-24 lattice_0.17-22 igraph_0.5.2-2 loaded via a namespace (and not attached): [1] grid_2.9.0 Please help Matrix Experts Thanks in advance Nathan [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.