
library(dplyr)
library(ggpubr)
library(cowplot)

folder <- 'c:\Users\User\Desktop\Extending Power BI\kod\Extending-Power-BI-with-Python-and-R-main\Chapter14'

histodensity_lst <- readRDS(file.path(folder, 'Demo\\histodensity_lst.rds'))
histodensity_transf_lst <- readRDS(file.path(folder, 'Demo\\histodensity_transf_lst.rds'))

# Odkomentuj, jeśli skrypt nie jest uruchamiany w usłudze Power BI
#dataset <- data.frame(numeric_col_name = names(histodensity_lst))

col_name <- (dataset %>% pull(1))[1]
dataset_type <- (dataset %>% pull(2))[1]

if (dataset_type == 'standard') {
  histodensity_lst[[col_name]]
} else {
  histodensity_transf_lst[[col_name]]
}

