Description Usage Arguments Examples
This function saves to a file a representation of the given networks
1 | save_network(g1,g2,filename,layout,taxnames,mode,imagesize)
|
g1 |
the original network X |
g2 |
the augmented network Y with additional nodes (all the original nodes from X must be present in the augmented network Y) |
filename |
the name of the file to save the network. Note that the file extension will automatically be added |
layout |
igraph layout function (default=layout.kamada.kawai) |
taxnames |
the taxon name of the nodes added to the original graph. By default, we select all nodes that are not in g1. Note that in order to display all the different taxa groups, you must use 'allgroup' as the taxnames argument |
mode |
type of file to create either: 'png', 'svg', or 'eps' (default='png') |
imagesize |
size of the image in pixels (default=800 px) |
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
data(Sample_1)
## Save the networks to file using the default layout (layout.kamada.kawai)
## and size (1200px)
save_network(g1,g2,filename="sample1",imagesize=1200)
## Save the networks to a file using the layout.fruchterman.reingold layout,
## and in 'svg' format
save_network(g1,g2,filename="s", mode="svg",layout=layout.fruchterman.reingold)
## Save a network containing different groups
gsample <- random_network(ngroup=4)
save_network(gsample$g1,gsample$g2,filename="gsample", taxnames="allgroup")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.