1. Import the two Census Files into R

  2. Apply the following function to both Census Files to clean up the major codes

CleanUpMajorCodes <- function(dataset){
  
  library(stringr)

  df <- dataset %>%
    mutate(MAJOR_CODE = 
           case_when(str_length(MAJOR_CODE) == 1 ~ str_c("00000", MAJOR_CODE),
                     str_length(MAJOR_CODE) == 2 ~ str_c("0000", MAJOR_CODE),
                     str_length(MAJOR_CODE) == 3 ~ str_c("000", MAJOR_CODE)))
  
  return(df)
  
}
  1. Merge the Majors and Schools Code File to both Census Files

  2. Calculate the retention rate of all first-time freshmen (where Stype is ‘N’)

  3. How many first-time freshmen retained to Term 2 but are part-time? (Hours < 12)

  4. Get the table of students in the first term College of Education students whose ACT scores are higher than 22, HS GPA is above 3.5 and are full time

  5. Create a new field in the Majors and Schools file that creates codes for each College. Call this variable “COLLEGE_CODE” and encode it as the following: For the Arts, Humanities, and Social Sciences “CAHSS”, Business and Professional Studies “BPS”, Education “ED”, Provost (“PROVOST”), and Undesignated/Open Option (“UNDECIDED”).

  6. For first-time freshmen who retained to the second term, find their minimum, maxmum, mean and standard deviation of their ACT and HS GPA

  7. From the Census File for Term 2, compute the counts of students by ethnicity and student type

  8. Calculate the Perentage Change ((N2 - N1)/N2) in Biology Majors from Census 1 to Census 2