Week 1 Challenge Instructions
Challenge Overview
Today’s challenge is to
read in a dataset, and
create a network object
Load the Data
Read in one (or more) of the following data sets, using the correct R package and command.
- got_marriages.csv
- fish_encounters dataset (available in the
tidyrpackage) - got_like_dislike.csv
Find the _data folder, located inside the posts folder. Then you can read in the data, using base read.csv or read_csv standard tidy read command to read Comma Separated Values files or, alternatively, read the data in directly from loading a package.
Add any comments or documentation as needed. More challenging data sets may require additional code chunks and documentation.
Create a Network
Load the package igraph and create an igraph object (i.e. a graph or network) in the form of an edge list. The command may vary whether the data is given as a list of connections or an adjacency matrix. Is the network directed or undirected; weighted or unweighted; unimodal or bipartite? Can you plot it?