saving_calc: Calculates savings

Description Usage Arguments Examples

View source: R/savings.R

Description

This function calculates savings for retrofit data.

Usage

1
saving_calc(util, best_df, bdbid = NA, energy, session_id = NA)

Arguments

util

A post-retrofit data frame with columns: OAT, usage and end_date. See unretrofit_utility for more information about data format.

best_df

Pre retrofit best model data frame (of a single builiding) returned from batch_run.

bdbid

Building id, which identifies the building or the dataset. Defaults to NA.

energy

A charcter string. Energy Type, either 'Elec' or 'Fuel'.

session_id

Either a character string or a numeric value to keep track. Defaults to NA.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
retrofit_util = subset(retrofit_utility, retrofit_utility$bdbid == 846152
				& retrofit_utility$energy_type == 'Elec')
result = batch_run_energy_retrofit(retrofit_util, 'Elec')
pre_retrofit_util = subset(retrofit_util, retrofit_util$prepost == 3)
#subsetting for pre-retrofit period
pre_result = subset(result$best_result_df, result$best_result_df$prepost == 1)
savings_df = saving_calc(pre_retrofit_util, pre_result, 846152, 'Elec')

## End(Not run)

tinnaing347/bRema documentation built on Aug. 23, 2019, 9:15 p.m.