retained_calc: Function to calculate whether a student has repeated a grade.

View source: R/retained_calc.R

retained_calcR Documentation

Function to calculate whether a student has repeated a grade.

Description

This function calculates whether or not a student has repeated a grade. It returns a data.frame with the student ID and a character vector with Y representing they repeated the grade and N that they had not.

Usage

retained_calc(df, sid = "sid", grade = "grade", grade_val = 9)

Arguments

df

a data.frame containing minimally a student identifier and their grade.

sid

a character that indicates the name of the student id attribute in df. The default value is sid.

grade

a character that indicates the name of the student grade attribute in df. The default value is grade.

grade_val

a numeric vector that contains the value of the grade that is being checked for retention. The default value is 9.

Value

a data.frame

Author(s)

Jason P. Becker

Examples

x <- data.frame(sid = c(101, 101, 102, 103, 103, 103, 104),
               grade = c(9, 10, 9, 9, 9, 10, 10))
retained_calc(x)

eeptools documentation built on June 7, 2023, 5:06 p.m.