Skip to contents

Retrieves an instructor's name by index from the schedule and calculates their overload compensation using ol_comp(). Returns a clean, readable course-level compensation summary.

Usage

ol_comp_byindex(
  i,
  schedule_df,
  L = 4,
  U = 9,
  rate_per_cr = 2500/3,
  reg_load = 12,
  favor_institution = TRUE
)

Arguments

i

Integer index of the instructor (as returned by get_unique_instructors()).

schedule_df

A data frame of the full course schedule containing an INSTRUCTOR column.

L

Lower enrollment threshold for overload pay eligibility (inclusive). Default is 4.

U

Upper enrollment limit for proration (inclusive). Default is 9.

rate_per_cr

Overload pay rate per qualified credit hour. Default is 2500/3.

reg_load

Regular teaching load in credit hours. Default is 12.

favor_institution

Logical: if TRUE (default), favors the institution by prioritizing high-enrollment courses for regular load.

Value

Invisibly returns a tibble with the instructor’s course-level overload compensation summary.

Details

If favor_institution = TRUE (default), the function assigns high-enrollment courses to the regular load first, minimizing compensation.

If favor_institution = FALSE, low-enrollment courses are used toward the regular load first, preserving high-enrollment courses for overload pay.

This function internally uses get_instructor_schedule(), which supports flexible, case-insensitive regex matching for instructor names (e.g., "^smith$" or "johnson|williams").

Examples

# Example usage with a schedule dataframe:
# ol_comp_byindex(1, schedule_df = schedule)