From 48fe04eba9f07adcf2c0a4af6f9233d25b9a97da Mon Sep 17 00:00:00 2001 From: Dutchmen04 <54993415+Dutchmen04@users.noreply.github.com> Date: Sun, 25 Oct 2026 12:54:23 +0100 Subject: [PATCH] fix: more bugs --- R/create_cssd.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/create_cssd.R b/R/create_cssd.R index 27d0d2b..00c8e24 100644 --- a/R/create_cssd.R +++ b/R/create_cssd.R @@ -34,12 +34,12 @@ create_cssd <- function(){ cols <- table$cols joins <- joinses$tableName - for(path in tablePaths){ + for(year in names(tablePaths)){ if(!cbs_can_read(path)){ - print("unable to access table: %s with path: %s", tableName, path) + print(sprintf("unable to access table: %s with path: %s", tableName, path)) next } - year = names(path) + path = tablePaths[[year]] path = cbs_update_path(path) new <- read_sav(path, col_select = all_of(cols)) new <- verticalizer(new, year, startKey, endKey) @@ -49,7 +49,7 @@ create_cssd <- function(){ }else if(firstRun){ data <- rbind(data, new) }else{ - joins <- c("year") + joins <- c(joins, "year") data <- left_join(data, new, by = joins) } }