Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

compute_years_of_service

Compute years_of_service value


Description

Computes the years of service given an entry date or entry year

Usage

compute_years_of_service(
  x,
  entry_date_spec = NULL,
  reference_year = NULL,
  reference_month = NULL
)

Arguments

x

a string or number vector to be transformed

entry_date_spec

a string indicating the entry_date specification, can be one of NULL, "years", "entry_year", or "entry_date". If this parameter is set to NULL, the function automatically tries to infers the specification

reference_year

a number indicating the reference year in order to compute the years of service from an entry date. If entry_date_spec is "years", this parameter can be ignored.

reference_month

a number indicating the reference month in order to compute the years of service from an entry date. If entry_date_spec is "years" or "entry_years", this parameter can be ignored.

Value

a numeric vector of years of service


logib

Salary Analysis by the Swiss Federal Office for Gender Equality

v0.1.0
GPL-3
Authors
Jonathan Chassot [aut, cre], Jeremy Kolly [ctb], Federal Office for Gender Equality of Switzerland [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.