diff --git a/R/method_adjacency.R b/R/method_adjacency.R index aceffa8..26ad099 100644 --- a/R/method_adjacency.R +++ b/R/method_adjacency.R @@ -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", diff --git a/R/method_species_adjacency.R b/R/method_species_adjacency.R index 587ffa6..e7da64d 100644 --- a/R/method_species_adjacency.R +++ b/R/method_species_adjacency.R @@ -13,7 +13,7 @@ #' @seealso [adjacency()] #' #' @export -species_adjacency <- function(distance_estimate = min, +species_adjacency <- function(distance_estimate = stats::median, summarize = stats::median) { method( id = "species_adjacency", diff --git a/man/adjacency.Rd b/man/adjacency.Rd index 3643298..a1437d8 100644 --- a/man/adjacency.Rd +++ b/man/adjacency.Rd @@ -4,7 +4,7 @@ \alias{adjacency} \title{Score genes based on their proximity to the reference genes.} \usage{ -adjacency(distance_estimate = densest, summarize = min) +adjacency(distance_estimate = densest, summarize = stats::median) } \arguments{ \item{distance_estimate}{A function that will be used to summarize the @@ -12,8 +12,7 @@ distance values for each gene. See \code{\link[=densest]{densest()}} for the def implementation.} \item{summarize}{A function that will be used to combine the different -distances to the reference genes. By default \code{\link[=min]{min()}} is used. That means -the distance to the nearest reference gene will be scored.} +distances to the reference genes. By default \code{\link[stats:median]{stats::median()}} is used.} } \value{ An object of class \code{geposan_method}. diff --git a/man/species_adjacency.Rd b/man/species_adjacency.Rd index b2bf81f..bdfaba6 100644 --- a/man/species_adjacency.Rd +++ b/man/species_adjacency.Rd @@ -4,7 +4,7 @@ \alias{species_adjacency} \title{Score genes based on their adjacency to the reference genes within species.} \usage{ -species_adjacency(distance_estimate = min, summarize = stats::median) +species_adjacency(distance_estimate = stats::median, summarize = stats::median) } \arguments{ \item{distance_estimate}{Function for combining the distance differences