Thread for Gov 1005/1006 Students to Submit a Practice Reprex

enrollment <- read_excel = "class_enrollment_summary_by_term2.18.20.xlsx"
#> Error in enrollment <- read_excel = "class_enrollment_summary_by_term2.18.20.xlsx": object 'enrollment' not found

Created on 2020-02-18 by the reprex package (v0.3.0)

x <- read_excel("class_enrollment_summary_by_term2.18.20.xlsx", skip=3) %>%
  clean_names() %>% group_by(course_department) %>%
  summarize(sum = sum(total)) %>%
  arrange(desc(sum)) %>% slice(1:5)
#> Error in read_excel("class_enrollment_summary_by_term2.18.20.xlsx", skip = 3) %>% : could not find function "%>%"

Created on 2020-02-18 by the reprex package (v0.3.0)

Rplot

enrollment <- read_excel("class_enrollment_summary_by_term2.18.20.xlsx")

enrollment %>% filter(course_id = "109485")

x <- read_excel(file = "class_enrollment_summary_by_term2.18.20.xlsx")
#> Error in read_excel(file = "class_enrollment_summary_by_term2.18.20.xlsx"): could not find function "read_excel"

Created on 2020-02-18 by the reprex package (v0.3.0)

No user-supplied code found ... so we've made some up. You're welcome!

sprintf("Happy %s!", weekdays(Sys.Date()))
#> [1] "Happy Tuesday!"

Created on 2020-02-18 by the reprex package (v0.3.0)

gov_classes %>%
  gt() %>% 
  tab_header(
    title = "Top 5 Gov Classes"
  ) %>%
  cols_label(
    course_title = "Course Code",
    course_name = "Course Title",
    total = "Total Enrollment"
  )
#> Error in gov_classes %>% gt() %>% tab_header(title = "Top 5 Gov Classes") %>% : could not find function "%>%"
enrollment <- read_excel("class_enrollment_summary_by_term_2.13.20 copy.xlsx", skip = 3) %>%
  clean_names()
#> Error in read_excel("class_enrollment_summary_by_term_2.13.20 copy.xlsx", : could not find function "%>%"

x %>%
  arrange(desc(course_id))
#> Error in x %>% arrange(desc(course_id)): could not find function "%>%"

Created on 2020-02-18 by the reprex package (v0.3.0)

Created on 2020-02-18 by the reprex package (v0.3.0)

Could someone help me figure out why I didn't put a number after "skip =" ?

x <- read_excel(path = "~/Desktop/Projects/enrollment/class_enrollment_summary_by_term2.18.20.xlsx", 
           skip = )
#> Error in read_excel(path = "~/Desktop/Projects/enrollment/class_enrollment_summary_by_term2.18.20.xlsx", : could not find function "read_excel"

Created on 2020-02-18 by the reprex package (v0.3.0)

enrollment <- read_excel("class_enrollment_summary_by_term2.18.20.xl", skip = 3)
#> Error in read_excel("class_enrollment_summary_by_term2.18.20.xl", skip = 3): could not find function "read_excel"

Created on 2020-02-18 by the reprex package (v0.3.0)

enrollment <- read_excel("~/Desktop/GOV 1005 R Files/class-02-18/class_enrollment_summary_by_term2.18.20.xlsx", skip = 3) %>%
  clean_names() %>%
  filter(!is.na(course_name)) %>%
  group_by(course_department) %>%
  summarize(total = sum(total)) %.%
  arrange(desc(total)) %>%
    slice(1:5)
#> Error in read_excel("~/Desktop/GOV 1005 R Files/class-02-18/class_enrollment_summary_by_term2.18.20.xlsx", : could not find function "%>%"

Created on 2020-02-18 by the reprex package (v0.3.0)

x %>% group_by("Course Department") %>% arrangees(desc(Total))
#> Error in x %>% group_by("Course Department") %>% arrangees(desc(Total)): could not find function "%>%"

class_enrollment_summary_by_term2.18.20.xlsx
#> Error in eval(expr, envir, enclos): object 'class_enrollment_summary_by_term2.18.20.xlsx' not found

Created on 2020-02-18 by the reprex package (v0.3.0)