Week 1 Challenge Instructions

challenge_1
instruction
Loading Data and Creating a Network
Author

Oriol Vallès Codina

Published

February 13, 2023

Challenge Overview

Today’s challenge is to

  1. read in a dataset, and

  2. 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 tidyr package)
  • 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?