Description Usage Arguments Details Value Examples
A given amount of money (repair_monies
) is invested in repairing
the blockbuster_tibble
, passed as an arguement to the function.
The repair_monies
is distributed evenly to each buildingid
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).
1 | repair(blockbuster_tibble, repair_monies)
|
blockbuster_tibble |
a blockbuster dataframe or tibble. |
repair_monies |
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
(depending on 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 ...
A blockbuster_tibble
that has had building components repaired
(or not if repair_monies
are 0).
1 2 3 | quick_fix <- blockbuster(dplyr::filter(blockbuster_pds,
buildingid == 4382 | buildingid == 4472 | buildingid == 4487),
forecast_horizon = 2, rebuild_monies = 0, repair_monies = 2.5e6)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.