add_longevity_bonus: add_longevity_bonus

Description Usage Arguments Value

View source: R/compensation_funcs.R

Description

Add a longevity raise amount column depending on the years of service and emr job type. If the EMRJobType column is not in the dataset, the function will attempt to add it.

Usage

1
2
add_longevity_bonus(df, longevity_date_col, hr_rate_col, assgn_rate_col,
  annual_rate_col, opt_as_of_date)

Arguments

df

the dataframe to which the new columns will be appended

longevity_date_col

The name of the column containing the longevity date data for each person.

hr_rate_col

The name of the column containing the unadjusted hourly rate of the job

assgn_rate_col

The name of the column containing the unadjusted monthly rate of the job

annual_rate_col

The name of the column containing the unadjusted annual salary of the job

opt_as_of_date

An optional date on which to caluclate longevity bonus rates. Defaults to value found in the date column if unsupplied.

Value

The original dataframe with four new columns:

years_of_service

The total years of service as-of the last day of the month of the as-of date

PercentToBase

The percent bonus as a double i.e. no bonus corresponds with a PercentToBase == 1. Derived from the LongevityBonus Lookup table

BaseAndLongHourly

The Hourly pay rate with longevity bonus

BaseAndLongAssgn

The monthly pay rate with longevity bonus

BaseAndLongAnnual

The annual salary with longevity bonus


iancj88/msuopa documentation built on May 17, 2019, 7:07 p.m.