How to plot relationships in R?

陌路散爱 提交于 2019-12-06 10:02:06

This is known as an adjacency matrix.

There is some information in the R FAQ on plotting social networks expressed as matrices:

Plotting social network data can be easily done with the igraph package in R. [...] In order for the igraph package to recognize this table as a network, we can first convert it to a matrix. Then, if we wish to calculate graph-related statistics on it (betweenness, closeness, degree), we can use the matrix to create a graph object.

The FAQ gives some examples, resulting in sociogram diagrams, for example:

The igraph library itself is documented here - it can produce much more complex examples - see the screenshots page and the example below:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!