pull_Element_Data: Collate element- and block-level outputs from Blockbuster...

Description Usage Arguments Details Value Functions Examples

Description

A set of convenience functions for managing the raw output of a Blockbuster function call.

Usage

1
2
3
4
5
6
7
8
9
pull_Element_Data(blockbuster_output, type = "")

pull_Block_Data(blockbuster_output)

load_Element_Data(forecast.horizon, path = "./output/",
  filelabel = "blockbuster_output", type = "")

load_Block_Data(forecast.horizon, path = "./output/",
  filelabel = "blockbuster_output")

Arguments

blockbuster_output

The output from a Blockbuster call.

type

character. Selects whether the output contains tidy data about "area" or "backlog". If left as default, raw element data is output.

forecast.horizon

integer. This specifies how many years of the saved output will be loaded.

path

character. This should be the same as the argument passed to the Blockbuster function.

filelabel

character. This should be the same as the argument passed to the Blockbuster function.

Details

The functions pull_Block_data and pull_Element_data take the output from a Blockbuster call and combine the appropriate data into a single dataframe with a column for year.

For large datasets (for example, the PDS dataset), R can hit memory limits when the Blockbuster function tries to construct the single output object from the saved interim files. load_Block_Data and load_Element_Data loads only the relevant outputs from the saved files.

These functions can also provide area and backlog summaries in tidy format suitable for passing to ggplot2.

Value

A data.frame containing the appropriate data from the output, with a year column. If type = "area" then the output will contain the grade and component area in tidy format. If type = "backlog" then the output will contain the grade and backlog in tidy format.

Functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
# Collate the first ten years of output from an object output by
# Blockbuster
output <- Blockbuster(simulated_elements, forecast.horizon = 15)
pull_Block_Data(output, 10)
pull_Element_Data(output, 10)

## End(Not run)
# loading outputs from saved files
## Not run: 
Blockbuster(simulated_elements, path = "output", filelabel = "example")
load_Element_data(1, path = "output", filelabel = "example")
load_Block_data(1, path = "output", filelabel = "example")

## End(Not run)

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