View source: R/get_instructor_schedule.R
get_instructor_schedule | R Documentation |
Returns a subset of the course schedule containing courses taught by the specified instructor. Matching is case-insensitive and supports regular expressions, allowing flexible partial or pattern-based matching. If no match is found, a warning is issued and an empty data frame is returned.
get_instructor_schedule(instructor_name, schedule_df = schedule)
instructor_name |
A character string (or regular expression) used to match against values in the |
schedule_df |
A data frame containing course schedule data with an |
A data frame of courses assigned to instructors matching the given pattern, sorted by descending enrollment.
get_instructor_schedule("smith", schedule_df = schedule) # partial match
get_instructor_schedule("^Smith,", schedule_df = schedule) # regex: starts with Smith
get_instructor_schedule("Robinson|Smith", schedule_df = schedule) # regex: matches either
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.