From adc990b5aa2bf67f420f4437ad1cf780f0f80f3c Mon Sep 17 00:00:00 2001 From: Celine Date: Tue, 20 Feb 2024 07:35:46 -0500 Subject: [PATCH] bug: length_msg when options are not by default --- R/length.R | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/R/length.R b/R/length.R index 96cf0fc4..ed0ecd83 100644 --- a/R/length.R +++ b/R/length.R @@ -155,8 +155,12 @@ xportr_length <- function(.df, attr(.df[[i]], "width") <- length_data[[i]] } - length_msg <- left_join(var_length_max, metadata[, c(variable_name, variable_length)], by = variable_name) %>% - filter(length.x < length.y) + length_msg <- left_join(var_length_max, metadata[, c(variable_name, variable_length)], by = variable_name) + length_msg <- length_msg %>% + mutate(length_df = as.numeric(length_msg[[paste0(variable_length, ".x")]]), + length_meta = as.numeric(length_msg[[paste0(variable_length, ".y")]])) %>% + filter(length_df < length_meta) %>% + select(variable_name, length_df, length_meta) max_length_msg(length_msg, verbose) }