Courses/qss-swirl-socraticswirl/DISCOVERY/DISCOVERY2/initLesson.R

# Code placed in this file fill be executed every time the
# lesson is started. Any variables created here will show up in
# the user's working directory and thus be accessible to them
# throughout the lesson.


# Make path to lesson directory
lesson_dir <- file.path(path.package(substring(find("swirl")[1], 9)), "Courses", "DISCOVERY", "DISCOVERY2")

# Make path to data and let user call read.csv(data_path)
data_path <- file.path(lesson_dir, "florentine.csv")

# Load data into a variable for the user
florence <- read.csv(data_path, stringsAsFactors=FALSE, row.names = "FAMILY")
florence <- as.matrix(florence)

install.packages("igraph")
library(igraph)
HJ08003/socraticswirlInstructor-RStudioServer documentation built on May 23, 2019, 10:32 p.m.