From 18af32f4a53630550e589e1adc0e0711189bf794 Mon Sep 17 00:00:00 2001 From: mdkompella Date: Wed, 3 Sep 2025 15:29:31 -0600 Subject: [PATCH] read column type from domain column --- R/getEMLfunctions.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/getEMLfunctions.R b/R/getEMLfunctions.R index d4c1f6b4..15e3383d 100644 --- a/R/getEMLfunctions.R +++ b/R/getEMLfunctions.R @@ -858,10 +858,10 @@ get_attribute_tables <- function(eml_object) { # add a class column # rename dttm format column attr_temp_cleaned <- attr_temp_cleaned %>% - dplyr::mutate(class = dplyr::case_when(storageType %in% c("float", "double", "long", "int") ~ "numeric", + dplyr::mutate(class = dplyr::case_when(domain == "numericDomain" ~ "numeric", (storageType == "string" & domain == "textDomain") ~ "character", (storageType == "string" & domain == "enumeratedDomain") ~ "categorical", - storageType == "date" ~ "Date", + domain == "dateTimeDomain" ~ "Date", TRUE ~ "")) %>% dplyr::rename(dateTimeFormatString = formatString) %>% dplyr::select(attributeName, attributeDefinition, class, unit, dateTimeFormatString, missingValueCode, missingValueCodeExplanation)