diff --git a/R/length.R b/R/length.R index ed0ecd83..5a6092c6 100644 --- a/R/length.R +++ b/R/length.R @@ -157,8 +157,10 @@ xportr_length <- function(.df, 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")]])) %>% + 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)