I am passing in a csv file with two columns, the first being the major and the second being the courses in that major. For some reason when I run this, current_major is not showing up in my enviorment and when I run it in the console, it tells me that the object "current" is not found. I am having a lot of trouble understanding what is going wrong here.
course_data <- read.csv("file location")
majorCompare <- function(current, new){
current_major <- which(course_data$major == current)
}
majorCompare("Animal Science", "American Studies")