A given amount of money (
repair_monies) is invested in repairing
blockbuster_tibble, passed as an arguement to the function.
repair_monies is distributed evenly to each
included in the
blockbuster_tibble. Grade D, C and B condition
building components are repaired to A in that order. Partial repairs does not happen
and any overspend is discarded (spent by the school on other things).
a blockbuster dataframe or tibble.
a vector of length one.
Outputs a blockbuster_tibble after spending
repair_monies on a finite
number of blocks. Repairing a block attempts to convert some
repair_monies available) of it's building components
back to grade A, making it Excellent condition. If the building components have
zero cost they are assumed to be grade N or A (this is not always true) and are not
repaired (the cost model is the issue not the assumption). The input is seperated into
a list of dataframes by block and then
repair_status binary variable added using
the internal helper function
what_needs_repair_within_block. The repairs are
then carried out an additional helper function called ...
blockbuster_tibble that has had building components repaired
(or not if
repair_monies are 0).
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.