View source: R/render_scenario_snapshot.R
render_scenario_snapshot | R Documentation |
Rendering a scenario snapshot
render_scenario_snapshot(scenario, index = 0, currency = "", big_mark = " ")
scenario |
A |
index |
The index of the scenario year to render. By default, it is 0, which corresponds to the current year. |
currency |
The currency symbol to use as a suffix. |
big_mark |
The character to use as a big mark. It separates thousands. |
A gt::gt()
object.
older_member <- HouseholdMember$new(
name = "older",
birth_date = "1980-02-15",
mode = 80,
dispersion = 10
)
household <- Household$new()
household$add_member(older_member)
household$expected_income <- list(
"income" = c(
"members$older$age <= 65 ~ 9000 * 12"
)
)
household$expected_spending <- list(
"spending" = c(
"members$older$age <= 65 ~ 5000 * 12",
"TRUE ~ 4000 * 12"
)
)
portfolio <- create_portfolio_template()
portfolio$accounts$taxable <- c(10000, 30000)
portfolio <-
portfolio |>
calc_effective_tax_rate(
tax_rate_ltcg = 0.20,
tax_rate_ordinary_income = 0.40
)
scenario <-
simulate_scenario(
household = household,
portfolio = portfolio,
current_date = "2020-07-15"
)
render_scenario_snapshot(scenario)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.