repairGrade: Repair components of a particular grade

Description Usage Arguments Details Value Examples

Description

This function is used by Repair to repair all components at a particular grade.

Usage

1
repairGrade(element.data, grade)

Arguments

element.data

An element-level data frame, with a repair_money attribute indicating the money allowed for repairs

grade

Either "B", "C", "D" or "E". The grade to repair.

Details

Components are sorted by their proportion at the given grade. They are then repaired in descending order until the money given by budget runs out.

Value

The element-level data frame with repairs completed, and a numeric amount stating the remaining funds as an attribute.

Examples

1
2
3
4
5
6
elements <- simulated_elements
# the input to repairGrade needs a value for the "repair_money" attribute.
attr(elements, "repair_money") <- 10000

blockbuster2:::repairGrade(elements, "A")
blockbuster2:::repairGrade(elements, "C")

DFE-Capital/Blockbuster-2 documentation built on May 26, 2019, 7:23 a.m.