Week 1 Challenge - AG

Loading Data and Creating a Network
Author

Alex Genovese

Published

February 13, 2023

Code
library(tidyverse)
── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
✔ ggplot2 3.4.0     ✔ purrr   0.3.4
✔ tibble  3.1.8     ✔ dplyr   1.0.9
✔ tidyr   1.2.0     ✔ stringr 1.4.0
✔ readr   2.1.2     ✔ forcats 0.5.1
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
Code
fish_encounters <- fish_encounters

library(igraph)

Attaching package: 'igraph'

The following objects are masked from 'package:dplyr':

    as_data_frame, groups, union

The following objects are masked from 'package:purrr':

    compose, simplify

The following object is masked from 'package:tidyr':

    crossing

The following object is masked from 'package:tibble':

    as_data_frame

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union
Code
fish_encounters.net <-graph_from_data_frame(fish_encounters,
                                      directed=FALSE)
plot.igraph(fish_encounters.net,margin=0,arrow.mode="-")

Code
is_directed(fish_encounters.net)
[1] FALSE
Code
is_weighted(fish_encounters.net)
[1] FALSE
Code
is_bipartite(fish_encounters.net)
[1] FALSE