Categories

Smooth line for barplot graph – R

The bar plot Start with a dataframe with the values already sorted, then place each into a vector. The three back into a dataframe The Bar Plot Place the bartop into a variable to use later The graph should look something like this A Ragged Line Take the Gini coef column from the original dataframe… […]

Categories

Reordering Columns and Rows – R

How to reorder columns and rows in a dataframe. We start with three vectors which we will put into a data frame called tDF Renaming Columns There is away of entering the names when building the data frame, like this… But let’s just prentend we forgot to do that, and instead we’ve ended up with […]

Categories

Connections Between Networks – R

This graph shows how connected each network is within a system. Each node represents a network, and each edges represents a person overlapping them. The darker the edge color, the more people spanning across the two communities. This post explains the method in a bit more detail. This graph was made in R, with the […]

Categories

Draw and Save Network to PDF – R

Assuming you start with a pajek file, you can use the following two functions to draw the graph and save it on to a PDF file. Then you call the function like this …and you get something like this

Categories

iGraph Graph Layouts Graph – R

Small Network Vertices: 241 Edges: 447

Categories

Some Social Networks – R

Using this format Droid V6 Vertices: 118 Edges: 244 Slide V6 Vertices: 241 Edges: 447

Categories

Graph Centrality – R

This little R script calculates all three of Freeman’s Centrality measures, for individual nodes and entire graph. I didn’t write it…I got it from here.

Categories

From nCol to Pajek 2/2 – Python & R

Continues from here. I just found that the Python script in the previous post breaks when it encounters non-alphanumerical characters. That means I had to run a small code through Vim to delete them on both the usrIDs.txt and output.txt files. Once that was done then I had to change the usrIDs.txt file to add […]

Categories

Make Dot file from nCol Data Frame – R

The output file will create something like this

Categories