# NOT RUN {
# Return the absolute migration in `principal_balance`
mock_credit %>%
migrate(
date = date,
rating = risk_rating,
metric = principal_balance
)
# Return the percent migration in `principal_balance` while using the "end"
# method for which period's metric values to migrate
mock_credit %>%
migrate(
date = date,
rating = risk_rating,
metric = principal_balance,
percent = TRUE,
method = "end"
)
# }
Run the code above in your browser using DataLab