Re: [R] Understanding mod.matrix for directed networks

2015-07-13 Thread Gábor Csárdi
I am sorry for the slow response. Please note that these are better channels for igraph help: http://igraph.org/r/#help As for your question, can you please send some R code that demonstrates your problem? Gabor On Tue, May 19, 2015 at 1:50 AM, Aziz, Muhammad Fayez az...@illinois.edu wrote:

[R] install.packages and dependencies=TRUE

2013-12-17 Thread Gábor Csárdi
Dear all, I am trying to install a private package, with its dependencies. However, both install.packages(sand_1.0.tar.gz, dependencies=TRUE, repos=NULL, type=source) and install.packages(sand_1.0.tar.gz, dependencies=Suggests, repos=NULL, type=source) fail to install suggested packages:

Re: [R] install.packages and dependencies=TRUE

2013-12-17 Thread Gábor Csárdi
Answer to myself. 'dependencies' are Not used if ‘repos = NULL’. Sorry for the noise. Gabor On Tue, Dec 17, 2013 at 11:26 AM, Gábor Csárdi csardi.ga...@gmail.com wrote: Dear all, I am trying to install a private package, with its dependencies. However, both install.packages(sand_1.0

Re: [R] install.packages and dependencies=TRUE

2013-12-17 Thread Gábor Csárdi
...@gmail.com wrote: On 17/12/2013 11:26 AM, Gábor Csárdi wrote: Dear all, I am trying to install a private package, with its dependencies. However, both install.packages(sand_1.0.tar.gz, dependencies=TRUE, repos=NULL, type=source) and install.packages(sand_1.0.tar.gz, dependencies=Suggests, repos

Re: [R] install.packages and dependencies=TRUE

2013-12-17 Thread Gábor Csárdi
On Tue, Dec 17, 2013 at 11:36 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: [...] I imagine some package has a function that does what you want, but I don't know it. It wouldn't be hard to put one together as follows: 1. install your package without its dependencies. This does not

[R] CRAN RSS feeds about updates and package checks

2013-05-07 Thread Gábor Csárdi
Dear All, I have put together a simple web service that notifies you about new and updated R packages and/or if CRAN package checks fail for your packages. It is all done via RSS feeds and there is a short description at http://cranky.igraph.org The feeds are dynamically created, so you don't

Re: [R] possible bug with largest.cliques in igraph_0.6-3

2012-10-31 Thread Gábor Csárdi
Indeed this seems to be a bug, if the graph is directed. The workaround is to convert it to an undirected graph, the clique computation ignores direction anyway: library(igraph) adj - matrix(1, nrow=11, ncol=11) - diag(11) g - graph.adjacency(adj) largest.cliques(g) # [[1]] # [1] 10 8 1 # #

Re: [R] help finding edge connecting two nodes

2012-10-19 Thread Gábor Csárdi
On Fri, Oct 19, 2012 at 2:50 PM, Dhaval Adjodah nuclear...@gmail.com wrote: [...] Your way works best! Another way I found from stackoverflow (see the post at http://stackoverflow.com/questions/12964332/igraph-edge-between-two-vertices/12980550#12980550) was to convert the graph into an

Re: [R] help

2012-08-22 Thread Gábor Csárdi
Hi, the thing is, you didn't really have any questions in your email. What is the problem with your code? Is it not giving the expected results? More below. On Wed, Aug 22, 2012 at 8:31 AM, Yanis El Omari yanis.elom...@esma.europa.eu wrote: [...] Rm(list()) What is this this supposed to do? Do

Re: [R] per-vertex statistics of edge weights

2012-08-15 Thread Gábor Csárdi
On Wed, Aug 15, 2012 at 2:04 PM, Sam Steingold s...@gnu.org wrote: 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 -

Re: [R] [igraph] per-vertex statistics of edge weights

2012-08-15 Thread Gábor Csárdi
On Wed, Aug 15, 2012 at 4:10 PM, Sam Steingold s...@gnu.org wrote: [...] Also, this takes forever and consumes almost all 8GB RAM. It has been running on --8---cut here---start-8--- IGRAPH DNW- 18590 6734992 -- + attr: name (v/c), count (v/n), weight (e/n)

Re: [R] igraph: Turn multiple edges into weights

2012-08-15 Thread Gábor Csárdi
On Tue, Aug 14, 2012 at 5:09 PM, Jonas Michaelis jonas.michae...@gmail.com wrote: 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

Re: [R] Subgraph isomorphism using vertex labels

2012-08-01 Thread Gábor Csárdi
Hi, igraph will give you the mappings via vertex ids. If you want to use symbolic vertex names, then attach a vertex attribute called 'name'. Then any vector of numeric vertex ids (v, from graph g) can be converted to vertex names via V(g)$name[v] or the more readable equivalent

Re: [R] Subgraph isomorphism using vertex labels

2012-08-01 Thread Gábor Csárdi
gives the mapping of the structure(without labels) For above eg: igraph only sees the one edge structure(of graph 2) without labels or names and gives all possible edges in the main graph(1) to be isomorphic to the query graph(2) On Wed, Aug 1, 2012 at 9:20 PM, Gábor Csárdi csa

Re: [R] igraph function graph.bfs unavailable

2012-07-12 Thread Gábor Csárdi
Hi David, please make sure that you have the 0.6 version of igraph installed. You might need to upgrade your R installation to install the 0.6 version of igraph. Best, Gabor On Wed, Jul 11, 2012 at 10:36 AM, David Marx dm...@soundexchange.com wrote: Hi, I've installed the igraph package and

[R] [R-pkgs] igraph 0.6 released

2012-06-18 Thread Gábor Csárdi
Dear All, we have released version 0.6 of the igraph package today. This is a major new version, with a lot of new features, and (sadly) it is not completely compatible with code that was written for the previous igraph versions. (See Major new features below for details.) I have included below

Re: [R] the largest independent (stable) set on graphs

2012-06-12 Thread Gábor Csárdi
The unreleased 0.6 version of igraph has a much faster implementation for this, you can download a nightly build source R package from here: https://code.google.com/p/igraph/downloads/list Make sure that you download the right file, there are C, Python packages there as well. I can send you a

Re: [R] R and igraph problems

2012-06-04 Thread Gábor Csárdi
On Sun, Jun 3, 2012 at 3:43 AM, peter dalgaard pda...@gmail.com wrote: On Jun 2, 2012, at 15:43 , jalantho...@verizon.net wrote: Why is igraph 0.5.5 not on the igraph sourceforgwe home page? You'll have to ask the igraph developers... Possibly, they just ran out of round tuits. Yes, kind

Re: [R] igraph and igraph0

2012-06-04 Thread Gábor Csárdi
On Sat, Jun 2, 2012 at 9:58 AM, jalantho...@verizon.net jalantho...@verizon.net wrote: Could someone tell me the difference between igraph and igraph0? I searched the CRAN web site, but cannot find an explantion of the differences. You are right that this should be in the package

Re: [R] community finding in a graph and heatplot

2012-06-04 Thread Gábor Csárdi
On Sun, Jun 3, 2012 at 4:11 PM, Aziz, Muhammad Fayez az...@illinois.edu wrote: Hmm interesting. To come to think of it there could be many disconnected components in the graph and thus there should be a generic way to either mitigate the disconnectedness in the dendrogram or in the original

Re: [R] community finding in a graph and heatplot

2012-06-03 Thread Gábor Csárdi
with the problem of malfunctioning dendogram by fgc. I hope this helps you narrow down to the solution. Best, Fayez From: csardi.ga...@gmail.com [csardi.ga...@gmail.com] on behalf of Gábor Csárdi [csa...@rmki.kfki.hu] Sent: Thursday, May 31, 2012 4:23 PM

Re: [R] community finding in a graph and heatplot

2012-05-31 Thread Gábor Csárdi
On Tue, May 29, 2012 at 1:16 AM, Aziz, Muhammad Fayez az...@illinois.edu wrote: 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

Re: [R] community finding in a graph and heatplot

2012-05-31 Thread Gábor Csárdi
From: csardi.ga...@gmail.com [csardi.ga...@gmail.com] on behalf of Gábor Csárdi [csa...@rmki.kfki.hu] Sent: Thursday, May 31, 2012 10:45 AM To: Aziz, Muhammad Fayez Cc: r-help@r-project.org Subject: Re: [R] community finding in a graph and heatplot On Tue, May 29, 2012 at 1:16 AM

Re: [R] Help with V function in igraph

2012-05-14 Thread Gábor Csárdi
Something weird must be going on in your s641_social object. Can you just simply check that the vertex names look OK with 'V(s641_social)$name'? If they look good, then can you send me the s641_social object in private? (Or part of it, assuming a part is enough to reproduce the problem.) Best,

Re: [R] Add attributes to igraph vector by name, not index

2012-04-26 Thread Gábor Csárdi
Hi, you can iterate over the vertices, but it'll be probably slow. The best solution is to create the graph directly from the data frame(s) containing all structure and attribute data. See the graph.data.frame() function for this. Btw. it might be worth to post your igraph related questions to

Re: [R] On-demand importing of a package

2011-11-23 Thread Gábor Csárdi
, but Rmpi is only suggested, there is no hard dependency. This seems to work well for snow, but in my case I the S4 features in Matrix interfere. Gabor On Tue, Nov 22, 2011 at 8:09 PM, Gábor Csárdi csa...@rmki.kfki.hu wrote: Dear Martin, thanks a lot, this all makes sense and looks great. I

[R] On-demand importing of a package

2011-11-22 Thread Gábor Csárdi
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

Re: [R] On-demand importing of a package

2011-11-22 Thread Gábor Csárdi
calling Matrix's namespace directly? Matrix:::rowSums() Michael On Tue, Nov 22, 2011 at 3:16 PM, Gábor Csárdi csa...@rmki.kfki.hu wrote: 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

Re: [R] On-demand importing of a package

2011-11-22 Thread Gábor Csárdi
is that if I do this, then I get the error I've shown in my initial email. I.e. Matrix is there, it is loaded, but the rowSums() generic is not called for some reasons. Thanks again, Gabor Cheers, Josh On Tue, Nov 22, 2011 at 12:16 PM, Gábor Csárdi csa...@rmki.kfki.hu wrote: Dear All

Re: [R] On-demand importing of a package

2011-11-22 Thread Gábor Csárdi
On Tue, Nov 22, 2011 at 4:27 PM, Martin Morgan mtmor...@fhcrc.org wrote: [...] No need to Depend:. Use Imports: Matrix plus in the NAMESPACE file  importFrom(Matrix, rowSums) Why do you not want to do this? Matrix is available for everyone, Imports: doesn't influence the package search

Re: [R] On-demand importing of a package

2011-11-22 Thread Gábor Csárdi
function, but it works fine for the toy f() function, so I think I can sort this out from here. Best Regards, Gabor On Tue, Nov 22, 2011 at 6:57 PM, Martin Morgan mtmor...@fhcrc.org wrote: On 11/22/2011 03:06 PM, Gábor Csárdi wrote: On Tue, Nov 22, 2011 at 4:27 PM, Martin Morganmtmor...@fhcrc.org

Re: [R] Minimum cutsets

2011-10-14 Thread Gábor Csárdi
On Thu, Oct 13, 2011 at 7:47 PM, malhomidi mal...@essex.ac.uk wrote: Hi again,         I've looked at the links above and I see the development version of the igraph library. I see the src folder implemented in C. Are these source codes available in R or I just would have to use the C code?

Re: [R] Minimum cutsets

2011-10-12 Thread Gábor Csárdi
Hi Mohammed, http://igraph.sourceforge.net/doc/R/graph.maxflow.html For directed graphs, and s-t cuts you need the development version, from igraph.sf.net. The source code is either here: http://cran.r-project.org/web/packages/igraph/index.html or here:

Re: [R] plot.igraph

2011-09-29 Thread Gábor Csárdi
Dear Steven, you have two options, one is to make the multiple edges thicker, see the 'edge.width' argument for that. The other is to make multiple edges curve a bit, see the 'edge.curved' argument. Both of these are documented at ?igraph.plotting. You can use count.multiple() to find the edges

Re: [R] Questons about 'igraph' package

2011-09-15 Thread Gábor Csárdi
The 'name' attribute is not used for vertex labels by default. If you want to use it, you need to set it as the 'label' attribute as well, or supply them in the function call: tkplot(graph, vertex.label=V(graph)$name) Best, Gabor On Wed, Sep 14, 2011 at 7:11 PM, karena dr.jz...@gmail.com wrote:

Re: [R] matrix indexing (igraph ?)

2011-08-18 Thread Gábor Csárdi
This is not an igraph issue, I believe. You need to go over your indices and update the matrix, i.e. for (i in seq_along(t.list)) { temp[t.list[i], c.list[i]] - temp[t.list[i], c.list[i]] + 1 } Best, Gabor On Tue, Aug 2, 2011 at 4:50 PM, Robinson, David G dro...@sandia.gov wrote: I realize

Re: [R] matrix into vector with vertex names

2011-08-18 Thread Gábor Csárdi
Joe, what is melt() supposed to do here? What's wrong with the simple solution of creating a data.frame first, and then filling it with values through a loop? Actually, keeping the matrix is just as good, indexing is just as fast, and takes the same amount of memory as your three column matrix,

Re: [R] igraph - designing graph plot by attributes

2011-08-18 Thread Gábor Csárdi
Create a factor variable for the different age categories, see cut(). Then use as.integer() on the factor variable and index a vector of node sizes with it. E.g. g - graph.ring(10) V(g)$age - sample(20:78, vcount(g), replace=TRUE) V(g)$agecat - cut(V(g)$age, breaks = c(20,35,50,65,78)) V(g)$size

Re: [R] Watts Strogatz game

2011-05-04 Thread Gábor Csárdi
On Wed, May 4, 2011 at 9:28 AM, Robert Baer rb...@atsu.edu wrote: 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

Re: [R] Can't use attributes from gml file in Cytoscape

2011-04-15 Thread Gábor Csárdi
Hi, the problem is that igraph puts node colors into the GML file as simple vertex attributes, but this is not what Cytoscape expects. Plus, it seems that Cytoscape does not read all the node/edge attributes from the GML file, only the ones it interprets, so the color information is lost. Sadly,

Re: [R] Questions about 'igraph' package.......

2011-03-28 Thread Gábor Csárdi
On Mon, Mar 28, 2011 at 3:05 PM, karena dr.jz...@gmail.com wrote: 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

Re: [R] Questions about 'igraph' package.......

2011-03-28 Thread Gábor Csárdi
On Mon, Mar 28, 2011 at 3:12 PM, karena dr.jz...@gmail.com wrote: One more question is: when you plot the gene network, you only get a number on each node, then how can you match the numbers to the genes? V(g)$name gives the vertex names, in the order of vertex ids. E.g. here is how to create

Re: [R] Merging graphs with common nodes

2011-03-23 Thread Gábor Csárdi
Hi Sandeep. On Wed, Mar 23, 2011 at 1:03 PM, ssamberkar ssamber...@gmail.com wrote: [...] A -- B in G1 B -- C in G2 so in G3 I would expect A -- B B -- C Instead I get B -- Z which baffles me. This is because the operations are based on the internal vertex ids and not on the vertex

Re: [R] Characteristic Path length calculation

2011-03-22 Thread Gábor Csárdi
It is the same indeed. Best, Gabor On Tue, Mar 22, 2011 at 7:18 PM, kparamas kpara...@asu.edu wrote: Hi, I wish to calculate the characteristic path length of a graph. Is average.path.length(g) in 'igraph' the same as calculating the characteristic path length of the graph? Thanks,

Re: [R] Plotting Mean in plotting degree distribution

2011-03-04 Thread Gábor Csárdi
I think this would be rather something like abline(v=mean(degree(G))) Best, Gabor On Thu, Mar 3, 2011 at 8:04 PM, Scott Chamberlain scttchamberla...@gmail.com wrote: library(igraph) G - erdos.renyi.game(1000, 1/1000) # a random graph dd1 = degree.distribution(G) plot(dd1, xlab = degree,

Re: [R] httpd-access.log parsing and graph construction.

2011-02-01 Thread Gábor Csárdi
Hi Jeff, I am not sure what you want to do, but the 'graph' and 'igraph' packages are for network, graph theory, i.e. http://en.wikipedia.org/wiki/Graph_theory If you think that this is the kind of tool you need, look over the manual of the packages, and the documentation at the igraph homepage

Re: [R] Link prediction in social network with R

2010-12-28 Thread Gábor Csárdi
Dear Eu, On Wed, Dec 22, 2010 at 12:00 AM, EU JIN LOK ejl...@hotmail.com wrote: 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

Re: [R] Modify the vertex label

2010-09-27 Thread Gábor Csárdi
Hi, set the 'vertex.label.dist' parameter: g - graph.ring(10) tkplot(g, vertex.label.dist=1, layout=layout.circle) See ?igraph.plotting for details. Best, Gabor On Mon, Sep 27, 2010 at 11:18 AM, anderson nuel anderson@gmail.com wrote: Dear r-help, I create a graph of my baysian

Re: [R] Plotting multiple edges with iGraph

2010-09-07 Thread Gábor Csárdi
Hi Sasha, see the edge.curved graphical parameter and this message for some examples: http://lists.gnu.org/archive/html/igraph-help/2009-03/msg00170.html Best, Gabor On Sun, Sep 5, 2010 at 7:41 PM, sashaBsAs dietrich...@gmail.com wrote: Hello, I am working with the igraph package and I am

Re: [R] creation package

2010-08-26 Thread Gábor Csárdi
Dear Anderson, please see http://lists.nongnu.org/archive/html/igraph-help/2007-07/msg00010.html for the solution of the 'postscript font not included' problem. Best, Gabor On Wed, Aug 25, 2010 at 11:50 PM, anderson nuel anderson@gmail.com wrote: Dear r-help, I took your advice into

Re: [R] send out put to file in R

2010-07-16 Thread Gábor Csárdi
On Thu, Jul 15, 2010 at 6:38 PM, chakri_amateur chakri2...@yahoo.co.in wrote: [...] I want to extract the largest connected component (alias sub-graph) of the network. My input network is a large network of 1000 vertices and 15000 arcs. From this, I want to take out only the largest cluster.

Re: [R] send out put to file in R

2010-07-15 Thread Gábor Csárdi
On Thu, Jul 15, 2010 at 7:24 AM, chakri_amateur chakri2...@yahoo.co.in wrote: [...] wri write.graph (F://new, pajek) -      decompose.graph(g,  mode=weak, max.comps=NA, min.vertices= 20) But even that doesn't work No wonder, writing computer programs is not just typing in random words and

[R] S3 generics need identical signature?

2010-06-21 Thread Gábor Csárdi
Dear all, Writing R Extensions explicitly says that A method must have all the arguments of the generic, including ... if the generic does. A method must have arguments in exactly the same order as the generic. If the generic specifies defaults, all methods should use the same

Re: [R] S3 generics need identical signature?

2010-06-21 Thread Gábor Csárdi
On Mon, Jun 21, 2010 at 4:17 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: [...] The requirement is that the methods need to have signatures that contain all the arguments of the generic.  If the generic includes ..., then the methods can add other arguments, too.  So with the generic for

Re: [R] Package testing

2010-06-16 Thread Gábor Csárdi
wrote: Gábor Csárdi wrote: Dear all, I would like to write some tests for my R package, and the usual 'tests' directory seemed like a good solution, but there is something I cannot understand. It is possible to supply .Rout.save files with the expected output for the tests, which is great

[R] Package testing

2010-06-15 Thread Gábor Csárdi
Dear all, I would like to write some tests for my R package, and the usual 'tests' directory seemed like a good solution, but there is something I cannot understand. It is possible to supply .Rout.save files with the expected output for the tests, which is great. But since the tests are not run

Re: [R] fit a line to power law distribution

2010-04-21 Thread Gábor Csárdi
Hi, perhaps the example at http://igraph.sourceforge.net/screenshots2.html#8 helps. Best, Gabor On Tue, Apr 20, 2010 at 6:42 PM, Narges Zarabi narges.zar...@gmail.com wrote: Hi, I am trying to fit a line in the log plot of my networks degree distribution to show that it is a power-law

Re: [R] Biclustering package

2010-02-11 Thread Gábor Csárdi
Alex, the isa2 package implements the biclustering algorithm discussed in Bergmann S, Ihmels J, and Barkai N. Iterative signature algorithm for the analysis of large-scale gene expression data. Phys Rev E Stat Nonlin Soft Matter Phys 2003 Mar; 67(3 Pt 1) 031902 Best, Gabor On Thu, Feb 11, 2010

Re: [R] pickle in R

2010-02-03 Thread Gábor Csárdi
Perhaps you are looking for ?serialize. Best, Gábor On Thu, Feb 4, 2010 at 12:09 AM, mkna005 mkna005 mkna...@aucklanduni.ac.nz wrote: Hello all! I was wondering if there is a way to pickle an R object into a file like it is possible in python? Such as you have an complicated R object(not a

Re: [R] pickle in R

2010-02-03 Thread Gábor Csárdi
On Thu, Feb 4, 2010 at 12:20 AM, Frank E Harrell Jr f.harr...@vanderbilt.edu wrote: Gábor Csárdi wrote: Perhaps you are looking for ?serialize. Best, Gábor Wouldn't save( ) and load( ) be faster and result in much smaller files? Depends, functionality is not the same, I think. 'serialize

Re: [R] Biclustering / Co-clustering in more than 2 dimensions

2010-02-02 Thread Gábor Csárdi
Hi Tim, maybe you are looking for something like this: http://www.nature.com/nbt/journal/v26/n5/full/nbt1397.html It is relatively easy to implement in R, I think. Best, Gabor On Tue, Feb 2, 2010 at 3:44 PM, Tim Smith tim_smith_...@yahoo.com wrote: Hi, I was wondering if there existed a

Re: [R] R igraph clusters component

2009-12-04 Thread Gábor Csárdi
Hi, On Fri, Dec 4, 2009 at 3:12 AM, Gaurav Kumar gau...@gauravkumar.org wrote: 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,

Re: [R] Exact String Compare in R?

2009-11-03 Thread Gábor Csárdi
On Tue, Nov 3, 2009 at 2:41 PM, bamsel benam...@gmail.com wrote: Dear R users: Here's a barebones example of what I can't make work. As you can see, regexpr() does not perform an exact string match, which only occurs in row 1 of these data frames. Instead, as it's supposed to do, it finds b

Re: [R] random numbers between 0 and 1

2009-10-21 Thread Gábor Csárdi
I would suggest to use the generator at http://submoon.freeshell.org/pix/valium/dilbert_rng.jpg and subtract 8.5. Best, Gabor On Wed, Oct 21, 2009 at 9:25 PM, carol white wht_...@yahoo.com wrote: Hi, To generate random numbers between 0 and 1, do you use rnorm followed by dnrom? for ex, for

Re: [R] Compress (gzip) a pdf device

2009-10-02 Thread Gábor Csárdi
Rainer, if you are willing to patch the R source, then a solution might be the R connection patch, see http://wiki.r-project.org/rwiki/doku.php?id=developers:r_connections_api It is a bit outdated, but with a little work I could use it for R 2.9.2 and works fine. Best, Gabor On Fri, Oct 2, 2009

[R] Rd files, \itemize in \value

2009-10-02 Thread Gábor Csárdi
Dear All, how can I create a list in the \value{} section of an Rd file? The things I have tried: 1. \value{ text text \item more text \item even more } *** Syntax error: \item in /- \item more text \item even more\- 2. \value{ text text \item{more text} \item{even more} } This

Re: [R] Legend

2009-10-02 Thread Gábor Csárdi
On Fri, Oct 2, 2009 at 3:46 PM, Ashta sewa...@gmail.com wrote: I have more than three lines in one  and I want to add a legend  for each line abline( m1, col = 'red' ) ablime( m2, col = 'blue' ) abline( m3, col = 'purple' ) How can I add a legend? . Surprisingly, it is the legend()

Re: [R] preformatted and '#' in manual pages

2009-09-30 Thread Gábor Csárdi
On Tue, Sep 29, 2009 at 6:47 PM, Duncan Murdoch murd...@stats.uwo.ca wrote: On 9/29/2009 11:57 AM, Gábor Csárdi wrote: On Tue, Sep 29, 2009 at 5:36 PM, Duncan Murdoch murd...@stats.uwo.ca wrote: Gábor Csárdi wrote: Dear All, I have the following in a .Rd file: ...     human readable

Re: [R] preformatted and '#' in manual pages

2009-09-30 Thread Gábor Csárdi
On Wed, Sep 30, 2009 at 10:51 PM, Duncan Murdoch murd...@stats.uwo.ca wrote: On 9/29/2009 7:31 AM, Gábor Csárdi wrote: Uwe, thanks, but this does not help, I still get: LaTeX errors when creating PDF version. This typically indicates Rd problems. LaTeX errors found: ! You can't use `macro

[R] preformatted and '#' in manual pages

2009-09-29 Thread Gábor Csárdi
Dear All, I have the following in a .Rd file: ... human readable (not binary) format. The format itself is like the following: \preformatted{ \# vertex1name vertex2name [optionalWeight] vertex3name [optionalWeight] } Here, the first vertex of

Re: [R] preformatted and '#' in manual pages

2009-09-29 Thread Gábor Csárdi
-dortmund.de: From Writing R Extensions: ‘#’, ‘_’ and ‘’ must not be escaped. Uwe Ligges Gábor Csárdi wrote: Dear All, I have the following in a .Rd file: ...      human readable (not binary) format. The format itself is like      the following:      \preformatted

Re: [R] preformatted and '#' in manual pages

2009-09-29 Thread Gábor Csárdi
On Tue, Sep 29, 2009 at 5:36 PM, Duncan Murdoch murd...@stats.uwo.ca wrote: Gábor Csárdi wrote: Dear All, I have the following in a .Rd file: ...      human readable (not binary) format. The format itself is like      the following:      \preformatted{        \# vertex1name

Re: [R] Ford Fulkerson

2009-09-23 Thread Gábor Csárdi
Hi, with a different (faster) algorithm, but maximum flows are implemented in package igraph, although for some networks only calculating the flow value is supported, giving the flow itself is not. Best, Gabor On Wed, Sep 23, 2009 at 3:37 AM, shuva gupta shuvagu...@yahoo.com wrote: Hi, Is

Re: [R] Why S4 method is not visible from another package?

2009-09-18 Thread Gábor Csárdi
On Thu, Sep 17, 2009 at 5:59 PM, Martin Morgan mtmor...@fhcrc.org wrote: Gábor Csárdi wrote: Dear All, maybe this is something obvious, I seem to be incapable of understanding how S4 works. So, in package 'A' I defined a summary method for my class: setMethod(summary, signature(object

[R] Why S4 method is not visible from another package?

2009-09-17 Thread Gábor Csárdi
Dear All, maybe this is something obvious, I seem to be incapable of understanding how S4 works. So, in package 'A' I defined a summary method for my class: setMethod(summary, signature(object=ListHyperGResult), function(object, pvalue=pvalueCutoff(object), categorySize=NULL) {

Re: [R] Point patterns and igraph

2009-09-08 Thread Gábor Csárdi
Juanita, On Tue, Sep 8, 2009 at 8:02 AM, juanita choojuanitac...@gmail.com wrote: Hi, I have a data set consisting of the x and y coordinate locations of 1600 points. I would like to generate a graph using the functions in igraph. However the graph making functions in igraph requires the

Re: [R] Running R on read-only file system, without temporary directory

2009-09-05 Thread Gábor Csárdi
Murdoch Sent: Friday, September 04, 2009 5:05 PM To: Gábor Csárdi Cc: R mailing list Subject: Re: [R] Running R on read-only file system,without temporary directory On 04/09/2009 3:42 PM, Gábor Csárdi wrote: Dear All, I would like to do run R without having write permissions to any

[R] Running R on read-only file system, without temporary directory

2009-09-04 Thread Gábor Csárdi
Dear All, I would like to do run R without having write permissions to any directory on the system. It seems that I need to modify the R source code for this, to make R start without creating a temporary directory. So far, so good. But should I expect any more complications? Does R really need

Re: [R] Plotting to stdout

2009-08-28 Thread Gábor Csárdi
On Fri, Aug 28, 2009 at 1:06 PM, Oliver Bandeloli...@first.in-berlin.de wrote: [...] The goal was to produce a picture in a web-environment. At the moment rpy2 will be used maybe there are way to achieve something like that in this way, but I'm also new to rpy2. When the graphic could be

Re: [R] Plotting to stdout

2009-08-28 Thread Gábor Csárdi
On Fri, Aug 28, 2009 at 1:33 PM, Gabor Grothendieckggrothendi...@gmail.com wrote: [...] I could have used this functionality in a previous project as well; however, for Oliver's application just pass the filename to the python program use that in the img src=... tag (or have the python program

[R] Plotting to a connection

2009-08-25 Thread Gábor Csárdi
Dear All, is there a way to plot to a connection? I mean, I would like to do something like tc - textConnection(foo, w) png(tc) plot(...) close(tc) According to the documentation of the Cairo package, this should work with CairoPNG() (among others), but all I get is tc -

Re: [R] FYI conflict between statnet, igraph

2009-08-18 Thread Gábor Csárdi
Ben, I believe that the reason for this is that both packages define functions with the same name and the 'network' package does not have a NAMESPACE. A possible workaround is to load the 'igraph' package first, and then 'statnet' (which loads 'network', etc.) next. At least library(igraph)

Re: [R] Simulation

2009-05-13 Thread Gábor Csárdi
On Wed, May 13, 2009 at 5:13 PM, Debbie Zhang debbie0...@hotmail.com wrote: Dear R users, Can anyone please tell me how to generate a large number of samples in R, given certain distribution and size. For example, if I want to generate 1000 samples of size n=100, with a N(0,1)

Re: [R] I'm offering $300 for someone who know R-programming to do the assignments for me.

2009-05-09 Thread Gábor Csárdi
That's typical, my profs used to do this to me all the time. G. On Sat, May 9, 2009 at 6:17 PM, Carl Witthoft c...@witthoft.com wrote: Sorry, but your professor offered me $500 NOT to do your assignments. __ R-help@r-project.org mailing list

Re: [R] Hierarchical Diagram of Networks in sna or otherwise?

2009-05-05 Thread Gábor Csárdi
think it would be very useful to have a free implementation. (I would have already ported the graphviz layout algorithms to igraph, but their licenses are not compatible.) Best, Gabor Gábor Csárdi-2 wrote: Jarrett, the 'igraph' package has a layout called layout.reingold.tilford

Re: [R] Curved arrows

2009-04-30 Thread Gábor Csárdi
Paul, there might be other solutions as well, but there is an internal function in the igraph package that can draw curved arrows, it is called igraph:::igraph.Arrows(). As it is an internal function, it is not documented, but I think it is pretty straightforward to use. For the 'curved' argument

Re: [R] Curved arrows

2009-04-30 Thread Gábor Csárdi
:::igraph.Arrows(3,4,4,5, curved=-1) igraph:::igraph.Arrows(3,4,4,5, curved=1) You need igraph version 0.5.2 for this I think. Type head(igraph:::igraph.Arrows) to see the other arguments to play with. Gabor Thanks for your quick reply before that was much appreciated, Paul Gábor Csárdi-2 wrote

Re: [R] Creating datasets in packages

2009-04-30 Thread Gábor Csárdi
On Thu, Apr 30, 2009 at 10:33 PM, Hutchinson,David [PYR] david.hutchin...@ec.gc.ca wrote: In developing the package, I have associated datasets (*.rda) stored in the data sub-directory. I built and installed the package successfully. When I load the BowRiver dataset and USArrests

Re: [R] Hierarchical Diagram of Networks in sna or otherwise?

2009-04-29 Thread Gábor Csárdi
Jarrett, the 'igraph' package has a layout called layout.reingold.tilford that is designed for trees, there is a slight chance that it is good enough for you. Best, Gabor On Wed, Apr 29, 2009 at 10:11 PM, jebyrnes byr...@msi.ucsb.edu wrote: I've been using sna to work with some networks, and

Re: [R] covariance

2009-04-19 Thread Gábor Csárdi
sapply(seq_len(nrow(x)), function(i) var(x[i,], y[i,])) Gabor On Sun, Apr 19, 2009 at 7:12 PM, Benny Chain b.ch...@ucl.ac.uk wrote: Does anyone know a way to calculate the covariances between two arrays/matrices x and y, row by row. i.e. var(x[n,],y[n,]) for all n ? Benjamin Chain Division

[R] [R-pkgs] igraph 0.5.2

2009-04-18 Thread Gábor Csárdi
igraph is a package for graphs/networks. It has a C core and uses a simple and fast graph representation allowing millions of vertices and edges. LINKS Release notes for the 0.5.2 version: http://igraph.sourceforge.net/relnotes-0.5.2.html Release notes for the 0.5.1 version:

Re: [R] Igraph: family 'serif' not included in PostScript device

2009-04-16 Thread Gábor Csárdi
Knut, see this thread here: http://lists.gnu.org/archive/html/igraph-help/2007-07/msg00010.html Best, Gabor On Thu, Apr 16, 2009 at 10:03 AM, Knut Krueger r...@krueger-family.de wrote: Does anybody know how to solve this error? postscript(file= file.ps, family = Helvetica, font = Helvetica)

Re: [R] Search for a graph package - see link

2009-04-15 Thread Gábor Csárdi
On Wed, Apr 15, 2009 at 9:35 AM, Knut Krueger r...@krueger-family.de wrote: Gábor Csárdi schrieb: The would prefer two parallel arrows one for each direction. You can set 'curved' to a value close to zero and then the arrows will be only a bit curved. No I am lost ... do you mean

Re: [R] Search for a graph package - see link

2009-04-15 Thread Gábor Csárdi
...@krueger-family.de wrote: Gábor Csárdi schrieb: Dear Gabor, I am very sorry but i am not able to reproduce your example. there is no change, i am using r 2.8.0 [...] -- Gabor Csardi gabor.csa...@unil.ch UNIL DGM __ R-help@r-project.org mailing

Re: [R] Search for a graph package - see link

2009-04-14 Thread Gábor Csárdi
On Tue, Apr 14, 2009 at 6:07 PM, Knut Krueger r...@krueger-family.de wrote: Gábor Csárdi schrieb: Hmmm, how should 'plot' know automatically what size/width you want? Sorry, I don't really know what you want to achieve here. If you want to calculate the width from some properties of the graph

Re: [R] Search for a graph package - see link

2009-04-14 Thread Gábor Csárdi
On Tue, Apr 14, 2009 at 6:46 PM, Knut Krueger r...@krueger-family.de wrote: [...] In that case all lines would be thick and the actions Node 1 - 2  ,Node 3 - 1,Node 2 - 3   would be invisible, so I tried the narrow arrows to get above the thick arrows in an other colour, but I found no rule to

Re: [R] Minimum Spanning Tree

2009-04-08 Thread Gábor Csárdi
On Tue, Apr 7, 2009 at 11:06 PM, jpearl01 joshea...@hotmail.com wrote: There was an error in the file... an extraneous comma.  That's taken care of. however, my tree prints out an image that doesn't seem like a mst.  Attached is the csv file I used... Well, it looks definitely a tree to me.

Re: [R] Minimum Spanning Tree

2009-04-08 Thread Gábor Csárdi
On Wed, Apr 8, 2009 at 6:12 PM, jpearl01 joshea...@hotmail.com wrote: I am not sure what you mean. Of course you can plot it using different layouts, e.g. with layout.reingold.tilford (after choosing the root vertex in some way) and then it looks like a usual tree plot, but why would that be any

Re: [R] Minimum Spanning Tree

2009-04-08 Thread Gábor Csárdi
Actually, library(igraph) tab - read.csv(http://www.nabble.com/file/p22957493/sp_matrix.csv;) tab - tab[,-1] g - graph.adjacency(as.matrix(tab), weighted=TRUE) V(g)$label - V(g)$name mst - as.undirected(minimum.spanning.tree(g)) lay - layout.reingold.tilford(mst,

Re: [R] Minimum Spanning Tree

2009-04-08 Thread Gábor Csárdi
On Wed, Apr 8, 2009 at 10:20 PM, jpearl01 joshea...@hotmail.com wrote: That's like a miracle!  The only thing that would make this graph perfect is if the lengths of the edges were in the same ratio as the actual edge lengths from the matrix.  Is it possible to alter that? Not really. The

  1   2   >