From 880f6a4e9c2f3b9185dc72ac4a9665a2a054bc52 Mon Sep 17 00:00:00 2001 From: Alex Axthelm Date: Thu, 19 Dec 2024 11:31:29 +0100 Subject: [PATCH] Document and export `prep_exposure_pie` --- NAMESPACE | 1 + R/prep_exposure_pie.R | 14 ++++++++++++++ man/prep_exposure_pie.Rd | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 man/prep_exposure_pie.Rd diff --git a/NAMESPACE b/NAMESPACE index 72ed838..b047321 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,6 +1,7 @@ # Generated by roxygen2: do not edit by hand export(prep_company_bubble) +export(prep_exposure_pie) export(prep_exposure_stats) export(prep_key_bars_company) export(prep_key_bars_portfolio) diff --git a/R/prep_exposure_pie.R b/R/prep_exposure_pie.R index e2f37dd..45b5948 100644 --- a/R/prep_exposure_pie.R +++ b/R/prep_exposure_pie.R @@ -1,3 +1,17 @@ +#' Prepare data for exposure pie chart +#' +#' Prepare JSON data for the exposure pie chart. +#' +#' @param (data.frame) Audit file contents +#' @param asset_type (character scalar) Asset type (`Equity` or `Bonds`) +#' @param investor_name (character scalar) Investor name +#' @param portfolio_name (character scalar) Portfolio name +#' @param pacta_sectors (character vector) PACTA sectors +#' @param currency_exchange_value (numeric scalar) Currency exchange value to +#' convert to USD +#' @return (data.frame) suitible for serialization to JSON (using +#' `jsonlite::toJSON`/`jsonlite::write_json`) +#' @export prep_exposure_pie <- function(data, asset_type, diff --git a/man/prep_exposure_pie.Rd b/man/prep_exposure_pie.Rd new file mode 100644 index 0000000..1d81d42 --- /dev/null +++ b/man/prep_exposure_pie.Rd @@ -0,0 +1,36 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/prep_exposure_pie.R +\name{prep_exposure_pie} +\alias{prep_exposure_pie} +\title{Prepare data for exposure pie chart} +\usage{ +prep_exposure_pie( + data, + asset_type, + investor_name, + portfolio_name, + pacta_sectors, + currency_exchange_value +) +} +\arguments{ +\item{asset_type}{(character scalar) Asset type (\code{Equity} or \code{Bonds})} + +\item{investor_name}{(character scalar) Investor name} + +\item{portfolio_name}{(character scalar) Portfolio name} + +\item{pacta_sectors}{(character vector) PACTA sectors} + +\item{currency_exchange_value}{(numeric scalar) Currency exchange value to +convert to USD} + +\item{(data.frame)}{Audit file contents} +} +\value{ +(data.frame) suitible for serialization to JSON (using +\code{jsonlite::toJSON}/\code{jsonlite::write_json}) +} +\description{ +Prepare JSON data for the exposure pie chart. +}