Here you will find daily news and tutorials about R, contributed by over 750 bloggers.
There are many ways to follow us - By e-mail:On Facebook: If you are an R blogger yourself you are invited to add your own R content feed to this site (Non-English R bloggers should add themselves- here)

I published two functions to visualize trophic networks with three or n levels, although most of my work consists in dealing with two-mode (bipartite) networks. The R library bipartite provides two functions to visualize such webs (plotweb and visweb), and I am generally happy with the results of the latter. However, I sometimes find it difficult to use at it seems to require link intensity to be given as integers, and I never have this information. Even if it is easy to do something like

There are also some other minor things with the bipartite package (namely, it requires the matrix to be entered « the wrong way », i.e. with the columns where one should expect to find the rows) and the graphical output of this particular function that make me uncomfortable using it.

I wrote a very short piece of R code that uses lines from the original function (to be exhaustive : the calculation of the margin size, and the sorting of the matrix to give it an ecological meaning), and obtained the following output quite easily:

I quite like the look of this, and I think that it is really easier to follow who interacts with who by just « sliding » along the grey lines.