Skip to contents

Many functions in ReboundTools use the metadata from energy efficiency upgrade parameters as a starting point for rebound paths or other graph creation. This function provides a way to quickly extract that metadata.

Usage

extract_meta(
  .rebound_data,
  meta_cols = c(reference, case, original, upgrade),
  reference = ReboundTools::eeu_base_params$reference,
  case = ReboundTools::eeu_base_params$case,
  original = ReboundTools::eeu_base_params$original,
  upgrade = ReboundTools::eeu_base_params$upgrade
)

Arguments

.rebound_data

The data frame from which metadata is to be extracted.

meta_cols

A vector of column names for metadata columns. Default is c(reference, case, original, upgrade).

reference, case, original, upgrade

Names of metadata columns. See ReboundTools::eeu_base_params.

Value

A data frame containing only metadata columns.

Examples

load_eeu_data() %>% 
  extract_meta()
#> # A tibble: 3 × 4
#>   Reference Case       Original     Upgrade           
#>   <chr>     <chr>      <chr>        <chr>             
#> 1 None yet  Car        Ford Fusion  Ford Fusion Hybrid
#> 2 None yet  Lamp       Incandescent LED               
#> 3 None yet  Car, r = 0 Ford Fusion  Ford Fusion Hybrid