Calculate network density – R Video Tutorial | LinkedIn Learning, formerly Lynda.com

– [Instructor] When you analyze a social network, you will often be interested in how dense it is. The network’s density is the number of connections divided by the number of possible connections. A completely linked network has a density of one, while other networks will have a decimal value, representing the percent of possible links that are actually present. In this movie, I will show you how to measure network density and also how it varies, given different types of graphs. I’ve started R and the next thing I need to do is to make sure that the igraph package is available. So, in R, I will type library(igraph) and enter. And, it’s available. If you don’t have igraph available yet, then you need to go to an online CRAN site, which I show you how to do elsewhere in this course. Now we can use the igraph sample PA command, which creates a sample preferential attachment graph. So, I will type g1 then <- to indicate assignment and sample PA, so that’s sample_PA then a left…