Skip to contents

Store a scope record (from footprint_scope()) on an object as an attribute, so the result carries its goal-and-scope with it.

Usage

attach_scope(x, scope)

Arguments

x

Any R object, typically a footprint tibble.

scope

Scope tibble from footprint_scope().

Value

x, unchanged except for an added whep_scope attribute.

Examples

scope <- footprint_scope("cropland", "ha", "FABIO-MRIO")
result <- attach_scope(tibble::tibble(value = 1), scope)
get_scope(result)
#> # A tibble: 1 × 7
#>   stressor units method     boundary            allocation vintage limitations
#>   <chr>    <chr> <chr>      <chr>               <chr>      <chr>   <chr>      
#> 1 cropland ha    FABIO-MRIO cradle-to-farm-gate mass       NA      NA