I am getting the following error:
Error: arrange() failed at implicit mutate() step.
Problem with mutate() column ..2.
ℹ ..2 = title.
ℹ ..2 must be size 1180 or 1, not 12520.
Run rlang::last_error() to see where the error occurred.
when running this code:
academic.units <-
c("CISA-Intrdisp Hum & Comm", "CISA-Science & Mathmatics",
"College of Health Solutions MS", "College of Health Solutions NT",
"College of Health Solutions SH", "College Of Law", "English", "Hugh Downs School Of Comm",
"Humanities Arts & Cultural", "Journalism & Mass Comm", "Ldrshp and Integrative Studies",
"Math & Natural Sciences Div", "MDT Music", "Physics Department",
"Psychology", "Sch Biological & Hlth Sys Engr", "Sch Compt Infor & Dec Sys Engr",
"Sch Elect Comptr & Energy Engr", "Sch Engr Matter Trnsprt Energy",
"Sch Future of Innov in Society", "Sch Sustain Engr & Built Envrn",
"School Of Art", "School of Criminology & Crim J", "School Of Earth & Space Explor",
"School of Geog Sci & Urban Pln", "School of Math & Stat Sciences",
"School of Molecular Sciences", "School of Politics & Global St",
"School Of Public Affairs", "School of Social Transform", "School Of Social Work",
"SHPRS History Faculty", "Social & Behavioral Sciences", "Sols Administration & Faculty",
"SOS Faculty & Researchers", "The Design School", "The Sanford School",
"WPC Accountancy", "WPC Economics", "WPC Information Systems",
"WPC Management", "WPC Supply Chain Management")
get_study_sample <- function(d) {
d <-
d%>%
filter( title != "" & ! is.na(title) ) %>%
filter( Department.Description %in% academic.units ) %>%
arrange( Department.Description, title )
return(d)
}
I am getting the following error: Error: arrange() failed at implicit mutate() step.
mutate()
column..2
. ℹ..2 = title
. ℹ..2
must be size 1180 or 1, not 12520. Runrlang::last_error()
to see where the error occurred.when running this code:
academic.units <- c("CISA-Intrdisp Hum & Comm", "CISA-Science & Mathmatics", "College of Health Solutions MS", "College of Health Solutions NT", "College of Health Solutions SH", "College Of Law", "English", "Hugh Downs School Of Comm", "Humanities Arts & Cultural", "Journalism & Mass Comm", "Ldrshp and Integrative Studies", "Math & Natural Sciences Div", "MDT Music", "Physics Department", "Psychology", "Sch Biological & Hlth Sys Engr", "Sch Compt Infor & Dec Sys Engr", "Sch Elect Comptr & Energy Engr", "Sch Engr Matter Trnsprt Energy", "Sch Future of Innov in Society", "Sch Sustain Engr & Built Envrn", "School Of Art", "School of Criminology & Crim J", "School Of Earth & Space Explor", "School of Geog Sci & Urban Pln", "School of Math & Stat Sciences", "School of Molecular Sciences", "School of Politics & Global St", "School Of Public Affairs", "School of Social Transform", "School Of Social Work", "SHPRS History Faculty", "Social & Behavioral Sciences", "Sols Administration & Faculty", "SOS Faculty & Researchers", "The Design School", "The Sanford School", "WPC Accountancy", "WPC Economics", "WPC Information Systems", "WPC Management", "WPC Supply Chain Management") get_study_sample <- function(d) { d <- d%>% filter( title != "" & ! is.na(title) ) %>% filter( Department.Description %in% academic.units ) %>% arrange( Department.Description, title ) return(d) }
get_study_sample(d)