The purpose of this lab is to familiarize yourself with how networks are created and visualized in R.
In Lab 1 you created two networks. I would like you to continue working with those networks for this lab. Please review Tutorial 3 - Introduction to Networks in R and Tutorial 4 - Basics of Network Visualization prior to beginning this lab.
Two IMPORTANT points:
If you created a bipartite (i.e. two-mode) network in Lab 1 for either network, you will need to restructure the network to be unipartite for this assignment. But, this is a simple task! All you have to do is figure out which node set you want to connect and create direct connections between them. For example, if Jon and Julio both attended a Wu-Tang Clan concert, then the bipartite graph is: Jon-Event-Julio. That is, Jon and Julio are connected by the event. To make this unipartite, just remove the event such that you simply have: Jon-Julio.
If you review the instructions below and you feel like your network is not appropriate for the assignment and need to create a different example…that is fine! We will use these networks throughout the course, so I want to make sure you have something you can work with consistently.
Make sense? If you have questions before you begin, just post an issue to the course help page.
For each network you created, do the following:
read.csv()
function or create the network using the matrix()
function.network
.gplot()
function.gplot()
function.Download the template for this lab prior to beginning the lab.
When you have completed your assignment, click the “Knit” button to
render your .RMD
file into a .HTML
report.
Upload both your .RMD
and .HTML
files to
the appropriate link for this assignment on the Canvas page for this
course.
Remember to ensure the following before submitting your assignment.
See Google’s R Style Guide for examples of common conventions.
.RMD
files are knit into .HTML
and other
formats procedural, or line-by-line.
install.packages()
or
setwd()
are bound to cause errors in knittinglibrary()
in a previous chunkIf All Else Fails: If you cannot determine and fix
the errors in a code chunk that’s preventing you from knitting your
document, add eval = FALSE
inside the brackets of
{r}
at the beginning of a chunk to ensure that R does not
attempt to evaluate it, that is: {r eval = FALSE}
. This
will prevent an erroneous chunk of code from halting the knitting
process.