mirror of
https://github.com/johrpan/geposan.git
synced 2025-10-26 02:37:25 +01:00
Use median by default in adjacency methods
This commit is contained in:
parent
33cc33f81a
commit
074902b505
4 changed files with 6 additions and 8 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue