# ferdo R Lab | Lesson 5 v1.0 | Dataset setup
stopifnot(file.exists("data/class_synthetic.csv"))
d <- read.csv("data/class_synthetic.csv",
              na.strings=c("","NA"),stringsAsFactors=FALSE)
ok <- complete.cases(d[,c("study_hours","quiz_score")])
stopifnot(identical(dim(d),c(12L,4L)),
          sum(ok)==10L,
          identical(as.character(d$student_id[!ok]),c("S09","S10")),
          length(unique(d$student_id))==12L,
          all(d$quiz_score[!is.na(d$quiz_score)] >= 0),
          all(d$quiz_score[!is.na(d$quiz_score)] <= 100))
cat("R LAB LESSON 5 SETUP CHECK PASS\n")
