knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of lookthrough is to help to view the assets exposure using the look-through approach.
devtools::install_github("shrektan/lookthrough")
library(lookthrough) data(lkthr_sample) ptfs <- as_lkthr(lkthr_sample$ptfs) funds <- as_lkthr(lkthr_sample$funds) lkthr_match(ptfs, funds) lkthr_set(ptfs, lkthr_sample$attributes) print(ptfs, "exposure", "issuer", "guarantor")
plot(ptfs)
company_a <- lkthr_filter(ptfs, function(node) { "company_a" %in% node$issuer }) print(company_a, "issuer", "exposure") data.tree::Aggregate(company_a, "exposure", sum) company_a$ptf1$exposure
plot(company_a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.