Use median by default in adjacency methods

This commit is contained in:
Elias Projahn 2022-02-24 15:36:07 +01:00
parent 33cc33f81a
commit 074902b505
4 changed files with 6 additions and 8 deletions

View file

@ -32,15 +32,14 @@ densest <- function(data) {
#' distance values for each gene. See [densest()] for the default
#' implementation.
#' @param summarize A function that will be used to combine the different
#' distances to the reference genes. By default [min()] is used. That means
#' the distance to the nearest reference gene will be scored.
#' distances to the reference genes. By default [stats::median()] is used.
#'
#' @return An object of class `geposan_method`.
#'
#' @seealso [species_adjacency()]
#'
#' @export
adjacency <- function(distance_estimate = densest, summarize = min) {
adjacency <- function(distance_estimate = densest, summarize = stats::median) {
method(
id = "adjacency",
name = "Adjacency",