From 58381af6590412476c8f46973068f92b5108a0a0 Mon Sep 17 00:00:00 2001 From: CJ Yetman Date: Fri, 13 Dec 2024 20:45:33 -0500 Subject: [PATCH] update documentation --- R/create_ald_flag.R | 16 ++++++++++------ R/create_audit_file.R | 9 +++++---- R/export_audit_information_data.R | 19 ++++++++++++------- R/get_input_files.R | 2 +- man/create_ald_flag.Rd | 16 ++++++++++------ man/create_audit_file.Rd | 9 +++++---- man/export_audit_information_data.Rd | 19 ++++++++++++------- man/get_input_files.Rd | 2 +- man/pacta.portfolio.audit-package.Rd | 2 +- 9 files changed, 57 insertions(+), 37 deletions(-) diff --git a/R/create_ald_flag.R b/R/create_ald_flag.R index 8561bf7..5b87495 100644 --- a/R/create_ald_flag.R +++ b/R/create_ald_flag.R @@ -1,12 +1,16 @@ -#' A short description of the function +#' Add columns to flag existence of data in ABCD for each holding #' -#' A longer description of the function +#' Adds columns to a portfolio data frame flagging the existence of data related +#' to each holding in the ABCD data. It will add the `has_asset_level_data`, +#' `sectors_with_assets`, and `has_ald_in_fin_sector` columns. #' -#' @param portfolio A description of the argument -#' @param comp_fin_data A description of the argument -#' @param debt_fin_data A description of the argument +#' @param portfolio A data frame containing portfolio data +#' @param comp_fin_data A data frame containing company financial data +#' @param debt_fin_data A data frame containing debt financial data #' -#' @return A description of the return value +#' @return A data frame similar to the input portfolion data frame with three +#' added columns `has_asset_level_data`, `sectors_with_assets`, and +#' `has_ald_in_fin_sector` #' #' @export diff --git a/R/create_audit_file.R b/R/create_audit_file.R index 3aecc85..a26399c 100644 --- a/R/create_audit_file.R +++ b/R/create_audit_file.R @@ -1,11 +1,12 @@ -#' A short description of the function +#' Create the audit file for a processed portfolio #' -#' A longer description of the function +#' Creates an audit file from a processed portfolio, selecting the expected +#' columns. #' -#' @param portfolio_total A description of the argument +#' @param portfolio_total A data frame #' @param has_revenue Logical determining if revenue data is included or not #' -#' @return A description of the return value +#' @return A data frame #' #' @export diff --git a/R/export_audit_information_data.R b/R/export_audit_information_data.R index d89d29c..54f0181 100644 --- a/R/export_audit_information_data.R +++ b/R/export_audit_information_data.R @@ -1,13 +1,18 @@ -#' A short description of the function +#' Export audit data for Transition Monitor website #' -#' A longer description of the function +#' Exports three audit files for the Transition Monitor website, allowing the +#' website GUI to report to the user details about the audit process result. #' -#' @param audit_file_ A description of the argument -#' @param portfolio_total_ A description of the argument -#' @param folder_path A description of the argument -#' @param project_name_ A description of the argument +#' @param audit_file_ A data frame containing the audit data +#' @param portfolio_total_ A data frame containing the processed portfolio data +#' @param folder_path A length one character vector specifying the path where +#' the exported audit files should be saved +#' @param project_name_ An optional length one character vector specifying a +#' project name to prepend to the filenames. Default is `NA` which has no +#' effect. #' -#' @return A description of the return value +#' @return Returns `NULL` invisibly as it is called only for its side effect of +#' saving files #' #' @export diff --git a/R/get_input_files.R b/R/get_input_files.R index 49cce5c..4bb8422 100644 --- a/R/get_input_files.R +++ b/R/get_input_files.R @@ -3,7 +3,7 @@ #' A longer description of the function #' #' @param portfolio_name_ref_all A description of the argument -#' @param project_location A charcter string defining the path to the user's +#' @param project_location A character string defining the path to the user's #' data directory, usually "working_dir" and the value held in the #' `project_location` parameter #' diff --git a/man/create_ald_flag.Rd b/man/create_ald_flag.Rd index d99df0a..79167a6 100644 --- a/man/create_ald_flag.Rd +++ b/man/create_ald_flag.Rd @@ -2,20 +2,24 @@ % Please edit documentation in R/create_ald_flag.R \name{create_ald_flag} \alias{create_ald_flag} -\title{A short description of the function} +\title{Add columns to flag existence of data in ABCD for each holding} \usage{ create_ald_flag(portfolio, comp_fin_data, debt_fin_data) } \arguments{ -\item{portfolio}{A description of the argument} +\item{portfolio}{A data frame containing portfolio data} -\item{comp_fin_data}{A description of the argument} +\item{comp_fin_data}{A data frame containing company financial data} -\item{debt_fin_data}{A description of the argument} +\item{debt_fin_data}{A data frame containing debt financial data} } \value{ -A description of the return value +A data frame similar to the input portfolion data frame with three +added columns \code{has_asset_level_data}, \code{sectors_with_assets}, and +\code{has_ald_in_fin_sector} } \description{ -A longer description of the function +Adds columns to a portfolio data frame flagging the existence of data related +to each holding in the ABCD data. It will add the \code{has_asset_level_data}, +\code{sectors_with_assets}, and \code{has_ald_in_fin_sector} columns. } diff --git a/man/create_audit_file.Rd b/man/create_audit_file.Rd index f2bad07..be300aa 100644 --- a/man/create_audit_file.Rd +++ b/man/create_audit_file.Rd @@ -2,18 +2,19 @@ % Please edit documentation in R/create_audit_file.R \name{create_audit_file} \alias{create_audit_file} -\title{A short description of the function} +\title{Create the audit file for a processed portfolio} \usage{ create_audit_file(portfolio_total, has_revenue) } \arguments{ -\item{portfolio_total}{A description of the argument} +\item{portfolio_total}{A data frame} \item{has_revenue}{Logical determining if revenue data is included or not} } \value{ -A description of the return value +A data frame } \description{ -A longer description of the function +Creates an audit file from a processed portfolio, selecting the expected +columns. } diff --git a/man/export_audit_information_data.Rd b/man/export_audit_information_data.Rd index 17c775b..906de8d 100644 --- a/man/export_audit_information_data.Rd +++ b/man/export_audit_information_data.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/export_audit_information_data.R \name{export_audit_information_data} \alias{export_audit_information_data} -\title{A short description of the function} +\title{Export audit data for Transition Monitor website} \usage{ export_audit_information_data( audit_file_ = .GlobalEnv$audit_file, @@ -12,17 +12,22 @@ export_audit_information_data( ) } \arguments{ -\item{audit_file_}{A description of the argument} +\item{audit_file_}{A data frame containing the audit data} -\item{portfolio_total_}{A description of the argument} +\item{portfolio_total_}{A data frame containing the processed portfolio data} -\item{folder_path}{A description of the argument} +\item{folder_path}{A length one character vector specifying the path where +the exported audit files should be saved} -\item{project_name_}{A description of the argument} +\item{project_name_}{An optional length one character vector specifying a +project name to prepend to the filenames. Default is \code{NA} which has no +effect.} } \value{ -A description of the return value +Returns \code{NULL} invisibly as it is called only for its side effect of +saving files } \description{ -A longer description of the function +Exports three audit files for the Transition Monitor website, allowing the +website GUI to report to the user details about the audit process result. } diff --git a/man/get_input_files.Rd b/man/get_input_files.Rd index 233e547..c7816bd 100644 --- a/man/get_input_files.Rd +++ b/man/get_input_files.Rd @@ -12,7 +12,7 @@ get_input_files( \arguments{ \item{portfolio_name_ref_all}{A description of the argument} -\item{project_location}{A charcter string defining the path to the user's +\item{project_location}{A character string defining the path to the user's data directory, usually "working_dir" and the value held in the \code{project_location} parameter} } diff --git a/man/pacta.portfolio.audit-package.Rd b/man/pacta.portfolio.audit-package.Rd index cc1beed..9119863 100644 --- a/man/pacta.portfolio.audit-package.Rd +++ b/man/pacta.portfolio.audit-package.Rd @@ -28,7 +28,7 @@ Authors: Other contributors: \itemize{ - \item Rocky Mountain Institute \email{PACTA4investors@rmi.org} [copyright holder, funder] + \item RMI \email{PACTA4investors@rmi.org} [copyright holder, funder] } }