Feature aggregators
Usage
key_join_sum(.data, feature)
key_join_max(.data, feature)
key_join_min(.data, feature)
key_join_count(.data, feature)
Value
A dplyr::summarise to aggregate the features together using the given function (sum/max/min/count)
Examples
# Primarily used within the framework but can be used individually:
data <- dplyr::mutate(mtcars, key_name = rownames(mtcars), .before = dplyr::everything())
key_join_sum(data, "mpg") # sum(mtcars$mpg)
#> n
#> 1 642.9
key_join_max(data, "mpg") # max(mtcars$mpg)
#> n
#> 1 33.9
key_join_min(data, "mpg") # min(mtcars$mpg)
#> n
#> 1 10.4
key_join_count(data, "mpg") # nrow(mtcars)
#> n
#> 1 32