From 1d838db2c7e4c191d863778729f8d5187420d440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pepe=20M=C3=A1rquez=20Romero?= Date: Mon, 6 Mar 2023 16:54:45 +0100 Subject: [PATCH] bug variables duplicadas --- valid_variables_script2.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/valid_variables_script2.R b/valid_variables_script2.R index 371eac5..bb62283 100644 --- a/valid_variables_script2.R +++ b/valid_variables_script2.R @@ -135,7 +135,7 @@ check_values_format <- function(valid_columns, codebook_param){ print(current_column) variable_type <- codebook_param$Variable.type[codebook$Harmonised.variable.name == current_column] - if (is.na(variable_type)){ + if (length(variable_type) > 1 || is.na(variable_type)){ next } @@ -165,6 +165,8 @@ check_values_format <- function(valid_columns, codebook_param){ error <- paste("Unable to analyse data" , cnd, sep = " ") print(error) res <- c(res, error) + variables_out_of_range <- paste(variables_out_of_range, current_column, "Unable to analyze , check just in case, the format should be:", possible_values ,sep = " ") + variables_out_of_range <- paste(variables_out_of_range , "" , sep = "\n") }, { print(paste("Higher Limit: ", high_limit)) @@ -210,6 +212,8 @@ check_values_format <- function(valid_columns, codebook_param){ error <- paste("Unable to analyse data" , cnd, sep = " ") print(error) res <- c(res, error) + variables_out_of_range <- paste(variables_out_of_range, current_column, "Unable to analyze , check just in case, the format should be:", possible_values ,sep = " ") + variables_out_of_range <- paste(variables_out_of_range , "" , sep = "\n") }, { contingency_table <- ds.table(paste("data$",current_column,sep="")) -- 2.24.1