From 87b8db20afd4ac5c42271cbd32988b8221f17c25 Mon Sep 17 00:00:00 2001 From: gp1981 <45032495+gp1981@users.noreply.github.com> Date: Tue, 14 May 2024 20:35:06 +0200 Subject: [PATCH] WIP - handling cumulative val checks --- code/Functions/data_retrieval.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/Functions/data_retrieval.R b/code/Functions/data_retrieval.R index b1f94ba..7b0d195 100644 --- a/code/Functions/data_retrieval.R +++ b/code/Functions/data_retrieval.R @@ -811,10 +811,10 @@ IS_CF_std <- function(df_Facts) { df_std_IS_CF <- df_std_IS_CF %>% filter((Cumulative_quarters ==1 & !Modified_Quarterly_val) | (Cumulative_quarters !=1 & Modified_Quarterly_val)) - # # Prepare dataframe for pivot - # df_std_IS_CF_pivot <- df_std_IS_CF %>% - # distinct(description, year_end, quarter_end, Quarterly_val, .keep_all = TRUE) - # + # Prepare dataframe for pivot ---->>>> TO CHECK - Cost of Revenue <<<<< + df_std_IS_CF_pivot <- df_std_IS_CF %>% + distinct(description, year_end, quarter_end, Quarterly_val, .keep_all = TRUE) + df_std_IS_CF_pivot <- df_std_IS_CF %>% group_by(end,standardized_label,year_end,quarter_end,accn,form,cik,entityName,sic,sicDescription,tickers,Financial.Report) %>% summarise(