avg_closure: Finds the Average Length of IFC Moratoria.

View source: R/avg_closure.R

avg_closureR Documentation

Finds the Average Length of IFC Moratoria.

Description

avg_closure returns the average length of fraternity moratoria in days.

Usage

avg_closure(data, university, start1, end1, start2, end2)

Arguments

data

an object/dataframe/tibble.

university

the column in the object that contains the universities.

start1

the column in the object that contains the start date of the first moratorium.

end1

the column in the object that contains the end date of the first moratorium.

start2

the column in the object that contains the start date of the second moratorium.

end2

the column in the object that contains the end date of the second moratorium.

Details

This function relies on dplyr, lubridate, and rlang to work. Moreover, this function does a few operations. First, it selects only the columns of interest, then, it splits a tibble into two: one for first set of closures, and one for second closures (third coming). Next, it creates columns with the length of each of these closures. Finally, it binds together the two tibbles, and takes the mean of the length.

Examples

avg_closure(data, university, start1, end1, start2, end2)


michaeltopper1/ifc documentation built on Jan. 30, 2023, 10:08 a.m.