You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In particular, when comparing the output of target_market_share(..., by_company = FALSE) and target_market_share(..., by_company = TRUE), I would expect to see only the added column name_ald.
What I see in practice is three added columns: name_ald, and then the two unexpected columns sector_weighted_production and technology_weighted_production.
library(r2dii.data)
library(r2dii.match)
library(r2dii.analysis)
library(dplyr)
#> #> Attaching package: 'dplyr'#> The following objects are masked from 'package:stats':#> #> filter, lag#> The following objects are masked from 'package:base':#> #> intersect, setdiff, setequal, unionmatched<- match_name(loanbook_demo, ald_demo) %>%
prioritize()
out_false<- target_market_share(
matched,
ald_demo,
scenario_demo_2020,
region_isos_demo,
by_company=FALSE
)
out_true<- target_market_share(
matched,
ald_demo,
scenario_demo_2020,
region_isos_demo,
by_company=TRUE
)
#> Warning: You've supplied `by_company = TRUE` and `weight_production = TRUE`.#> This will result in company-level results, weighted by the portfolio#> loan size, which is rarely useful. Did you mean to set one of these#> arguments to `FALSE`?# similarly, as expected, if by_company = TRUE, the output has the same columns # regardless of if weight_production = T or F
setdiff(names(out_true), names(out_false))
#> [1] "name_ald" "sector_weighted_production" #> [3] "technology_weighted_production"# I would expect the only added column to be `name_ald`
setdiff(names(out_true), names(out_false)) =="name_ald"#> [1] TRUE FALSE FALSE
In particular, when comparing the output of
target_market_share(..., by_company = FALSE)
andtarget_market_share(..., by_company = TRUE)
, I would expect to see only the added columnname_ald
.What I see in practice is three added columns:
name_ald
, and then the two unexpected columnssector_weighted_production
andtechnology_weighted_production
.Created on 2021-05-03 by the reprex package (v2.0.0)
The text was updated successfully, but these errors were encountered: