Skip to content

Commit a32fee3

Browse files
authored
Merge pull request nationalparkservice#122 from RobLBaker/main
fix error in test_fields_match
2 parents ccec214 + 0120fb3 commit a32fee3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

R/tabular_data_congruence.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,12 @@ test_fields_match <- function(directory = here::here(), metadata = load_metadata
530530
# Get list of attributes for each table in the metadata
531531
metadata_attrs <- lapply(data_tbl, function(tbl) {arcticdatautils::eml_get_simple(tbl, "attributeName")})
532532
metadata_attrs$`@context` <- NULL
533-
names(metadata_attrs) <- arcticdatautils::eml_get_simple(data_tbl, "objectName")
533+
534+
table_names <- EML::eml_get(data_tbl, "objectName")
535+
table_names$`@context` <- NULL
536+
names(metadata_attrs) <- table_names
537+
# for some reason this returns an error? replaced with the above 3 lines:
538+
#names(metadata_attrs) <- arcticdatautils::eml_get_simple(data_tbl, "objectName")
534539

535540
# Get list of column names for each table in the csv data
536541
data_files <- list.files(path = directory, pattern = ".csv")

0 commit comments

Comments
 (0)