# Lines to fix semester notation so it is consistent and split up manual dates. x<-vector("character",1);y<-list() x[1]<-"O ends SS18; W ends SS20" x<-gsub("SS([0-9][0-9])","Summer 20\\1",x) f <- function(s) strsplit(s, ";") y<-sapply(x, f) # Find the split up strings by doing y[[1]][1] or y[[1]][2] etc. # Lines to put manually entered dates into the correct "bin." w<-list();eth<-w;o<-w;h<-w for(i in 1:length(x)){ w[[i]]<-grep("W",y[[i]]);eth[[i]]<-grep("E",y[[i]]);o[[i]]<-grep("O",y[[i]]);h[[i]]<-grep("H",y[[i]]) }