Re: [R] Hierarchical Diagram of Networks in sna or otherwise?
No worries. I've actually switched to using Rgraphviz from bioconductor, and the results are pretty great (after the initial head-pounding to get it setup). Gábor Csárdi-2 wrote: > > On Mon, May 4, 2009 at 8:31 PM, jebyrnes wrote: >> >> Nearly. The algorithm turns up slightly different graphs each time (and >> set.seed doesn't seem to make it consistent) > > Hmmm, that should not happen, I'll check it out. > >> and periodically chokes. > > Can you send me the graph for which this happens? > >> But >> better than what I had. Hrm. I don't know much about the algorithm >> graphviz uses for dot. Do you have a reference on hand? > > No, I don't. Have you checked the graphviz homepage? > >> If it's simple, >> I'd be willing to take a whack at it. > > I doubt that it is simple, but I 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 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 wrote: I've been using sna to work with some networks, and am trying to visualize them easily. My networks are hierarchical (food webs). All of the layout engines I've tried with gplot don't seem to plot hierarchical networks, as one would using dot from graphviz. While I could do all of this by outputting to dotfiles and running it through graphviz, the graphics I get from R are much cleaner, and more easily integrated into my analyses. Is there any good way to diagram a hierarchical network in R, either with the sna library or otherwise? It strikes me that at least the Netindices package can calculate trophic levels. Could this be used for node placement? -Jarrett -- View this message in context: http://www.nabble.com/Hierarchical-Diagram-of-Networks-in-sna-or-otherwise--tp23301819p23301819.html Sent from the R help mailing list archive at Nabble.com. __ 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. >>> >>> >>> >>> -- >>> Gabor Csardi UNIL DGM >>> >>> __ >>> 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. >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Hierarchical-Diagram-of-Networks-in-sna-or-otherwise--tp23301819p23374024.html >> Sent from the R help mailing list archive at Nabble.com. >> >> __ >> 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. >> > > > > -- > Gabor Csardi UNIL DGM > > __ > 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. > > -- View this message in context: http://www.nabble.com/Hierarchical-Diagram-of-Networks-in-sna-or-otherwise--tp23301819p23391709.html Sent from the R help mailing list archive at Nabble.com. __ 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.
Re: [R] Hierarchical Diagram of Networks in sna or otherwise?
On Mon, May 4, 2009 at 8:31 PM, jebyrnes wrote: > > Nearly. The algorithm turns up slightly different graphs each time (and > set.seed doesn't seem to make it consistent) Hmmm, that should not happen, I'll check it out. > and periodically chokes. Can you send me the graph for which this happens? > But > better than what I had. Hrm. I don't know much about the algorithm > graphviz uses for dot. Do you have a reference on hand? No, I don't. Have you checked the graphviz homepage? > If it's simple, > I'd be willing to take a whack at it. I doubt that it is simple, but I 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 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 wrote: >>> >>> I've been using sna to work with some networks, and am trying to >>> visualize >>> them easily. My networks are hierarchical (food webs). All of the >>> layout >>> engines I've tried with gplot don't seem to plot hierarchical networks, >>> as >>> one would using dot from graphviz. While I could do all of this by >>> outputting to dotfiles and running it through graphviz, the graphics I >>> get >>> from R are much cleaner, and more easily integrated into my analyses. >>> >>> Is there any good way to diagram a hierarchical network in R, either with >>> the sna library or otherwise? It strikes me that at least the Netindices >>> package can calculate trophic levels. Could this be used for node >>> placement? >>> >>> >>> -Jarrett >>> -- >>> View this message in context: >>> http://www.nabble.com/Hierarchical-Diagram-of-Networks-in-sna-or-otherwise--tp23301819p23301819.html >>> Sent from the R help mailing list archive at Nabble.com. >>> >>> __ >>> 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. >>> >> >> >> >> -- >> Gabor Csardi UNIL DGM >> >> __ >> 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. >> >> > > -- > View this message in context: > http://www.nabble.com/Hierarchical-Diagram-of-Networks-in-sna-or-otherwise--tp23301819p23374024.html > Sent from the R help mailing list archive at Nabble.com. > > __ > 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. > -- Gabor Csardi UNIL DGM __ 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.
Re: [R] Hierarchical Diagram of Networks in sna or otherwise?
Jarrett, At 11:31 AM -0700 5/4/09, jebyrnes wrote: Nearly. The algorithm turns up slightly different graphs each time (and set.seed doesn't seem to make it consistent) and periodically chokes. But better than what I had. Hrm. I don't know much about the algorithm graphviz uses for dot. Do you have a reference on hand? If it's simple, I'd be willing to take a whack at it. Gábor Csárdi-2 wrote: 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 wrote: I've been using sna to work with some networks, and am trying to visualize them easily. My networks are hierarchical (food webs). All of the layout engines I've tried with gplot don't seem to plot hierarchical networks, as one would using dot from graphviz. While I could do all of this by outputting to dotfiles and running it through graphviz, the graphics I get from R are much cleaner, and more easily integrated into my analyses. Is there any good way to diagram a hierarchical network in R, either with the sna library or otherwise? It strikes me that at least the Netindices package can calculate trophic levels. Could this be used for node placement? >> -Jarrett >> If you like the dot output from graphviz you can get that using Rgraphviz from bioconductor. Although somewhat difficult to install, once installed it works beautifully. Bill -- William Revelle http://personality-project.org/revelle.html Professor http://personality-project.org/personality.html Department of Psychology http://www.wcas.northwestern.edu/psych/ Northwestern University http://www.northwestern.edu/ Attend ISSID/ARP:2009 http://issid.org/issid.2009/ __ 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.
Re: [R] Hierarchical Diagram of Networks in sna or otherwise?
Nearly. The algorithm turns up slightly different graphs each time (and set.seed doesn't seem to make it consistent) and periodically chokes. But better than what I had. Hrm. I don't know much about the algorithm graphviz uses for dot. Do you have a reference on hand? If it's simple, I'd be willing to take a whack at it. Gábor Csárdi-2 wrote: > > 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 wrote: >> >> I've been using sna to work with some networks, and am trying to >> visualize >> them easily. My networks are hierarchical (food webs). All of the >> layout >> engines I've tried with gplot don't seem to plot hierarchical networks, >> as >> one would using dot from graphviz. While I could do all of this by >> outputting to dotfiles and running it through graphviz, the graphics I >> get >> from R are much cleaner, and more easily integrated into my analyses. >> >> Is there any good way to diagram a hierarchical network in R, either with >> the sna library or otherwise? It strikes me that at least the Netindices >> package can calculate trophic levels. Could this be used for node >> placement? >> >> >> -Jarrett >> -- >> View this message in context: >> http://www.nabble.com/Hierarchical-Diagram-of-Networks-in-sna-or-otherwise--tp23301819p23301819.html >> Sent from the R help mailing list archive at Nabble.com. >> >> __ >> 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. >> > > > > -- > Gabor Csardi UNIL DGM > > __ > 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. > > -- View this message in context: http://www.nabble.com/Hierarchical-Diagram-of-Networks-in-sna-or-otherwise--tp23301819p23374024.html Sent from the R help mailing list archive at Nabble.com. __ 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.
Re: [R] Hierarchical Diagram of Networks in sna or otherwise?
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 wrote: > > I've been using sna to work with some networks, and am trying to visualize > them easily. My networks are hierarchical (food webs). All of the layout > engines I've tried with gplot don't seem to plot hierarchical networks, as > one would using dot from graphviz. While I could do all of this by > outputting to dotfiles and running it through graphviz, the graphics I get > from R are much cleaner, and more easily integrated into my analyses. > > Is there any good way to diagram a hierarchical network in R, either with > the sna library or otherwise? It strikes me that at least the Netindices > package can calculate trophic levels. Could this be used for node > placement? > > > -Jarrett > -- > View this message in context: > http://www.nabble.com/Hierarchical-Diagram-of-Networks-in-sna-or-otherwise--tp23301819p23301819.html > Sent from the R help mailing list archive at Nabble.com. > > __ > 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. > -- Gabor Csardi UNIL DGM __ 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.
[R] Hierarchical Diagram of Networks in sna or otherwise?
I've been using sna to work with some networks, and am trying to visualize them easily. My networks are hierarchical (food webs). All of the layout engines I've tried with gplot don't seem to plot hierarchical networks, as one would using dot from graphviz. While I could do all of this by outputting to dotfiles and running it through graphviz, the graphics I get from R are much cleaner, and more easily integrated into my analyses. Is there any good way to diagram a hierarchical network in R, either with the sna library or otherwise? It strikes me that at least the Netindices package can calculate trophic levels. Could this be used for node placement? -Jarrett -- View this message in context: http://www.nabble.com/Hierarchical-Diagram-of-Networks-in-sna-or-otherwise--tp23301819p23301819.html Sent from the R help mailing list archive at Nabble.com. __ 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.