Calculate Overload Compensation for One Instructor (by Index)
Source:R/ol_comp_byindex.R
ol_comp_byindex.Rd
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.
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"
).