Skip to content

Commit 64665eb

Browse files
committed
Add the netcdf variable name to the attributes table
1 parent 1b27dd3 commit 64665eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/attributes.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ get_ncdf4_attributes <- function(nc) {
1818
}
1919

2020
attributes <- names(nc$var)
21-
result <- data.frame()
21+
result <- data.frame(attributeName=NA)
2222

2323
for (i in seq_along(attributes)) {
24+
result[i,"attributeName"] <- attributes[i]
2425
attribute <- ncdf4::ncatt_get(nc, attributes[i])
2526
names <- names(attribute)
2627

0 commit comments

Comments
 (0)