Skip to content

Instantly share code, notes, and snippets.

@thinkphp
Created June 20, 2025 14:54
Show Gist options
  • Save thinkphp/b13943e115c5b4f1de85e8471f5458e5 to your computer and use it in GitHub Desktop.
Save thinkphp/b13943e115c5b4f1de85e8471f5458e5 to your computer and use it in GitHub Desktop.
part 3 question 1)
library(tidyverse)
library(readxl)
#load the training data
training_data <- read_excel("training_participation_survey.xlsx")
#question 1: Error rates in variables
cat("\nPART 3 - Question 1: Error Rates\n")
#check program status errors (should only be specific values)
valid_program_status <- c("Completed and Passed","Completed but Failed","Dropped Out")
program_status_errors <- sum(!training_data$program_status %in% valid_program_status) / nrow(training_data) * 100
cat("Program Status Error Rate: ", round(program_status_errors, 1),"%\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment