diff --git a/R/convert_atmosphere_to_string.R b/R/convert_atmosphere_to_string.R index 3dc354f..4667c73 100644 --- a/R/convert_atmosphere_to_string.R +++ b/R/convert_atmosphere_to_string.R @@ -52,7 +52,10 @@ convert_atmosphere_to_string <- function( names(atm)[is_short] <- do_pad_short(names(atm)[is_short]) names(atm)[is_long] <- do_pad_long(names(atm)[is_long]) - header_text <- kwb.utils::collapsed(names(atm), "") + header_text <- c(names(atm)[!grepl("(cTop|cBot)[2-9][1-9]?[0-9]?", names(atm))], "RootDepth") %>% + do_pad_long() %>% + kwb.utils::collapsed(collapse = "") + body_lines <- apply(atm, 1L, kwb.utils::collapsed, "") kwb.utils::collapsed(c(header_text, body_lines), "\n")