Skip to content

Commit 2711718

Browse files
committed
add direction in as_tibble.cluster_metric_set()
1 parent fde9720 commit 2711718

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/metric-aaa.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ as_tibble.cluster_metric_set <- function(x, ...) {
210210
names <- names(metrics)
211211
metrics <- unname(metrics)
212212
classes <- map_chr(metrics, class1)
213-
dplyr::tibble(metric = names, class = classes)
213+
directions <- map_chr(metrics, attr, "direction")
214+
dplyr::tibble(metric = names, class = classes, direction = directions)
214215
}
215216

216217
class1 <- function(x) {

0 commit comments

Comments
 (0)