R/DEPRECATED-dist_pearson.R

Defines functions pearson.dist

#' @name DEPRECATED-pearson.dist
#' @concept deprecated
#'
#' @title (DEPRECATED)
#'        Distance based on Pearson's \eqn{R^2}{R squared}
#'
#' @description
#'
#' This function is **deprecated**.
#' Use [dist_pearson()] instead.
#'
#' @param ... Passed to [dist_pearson()].
#'
#' @export

pearson.dist <- function(...) {
  # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  hySpc_deprecated("dist_pearson")
  # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  dist_pearson(...)
}


hySpc.testthat::test(pearson.dist) <- function() {
  context("pearson.dist")

  test_that(
    "deprecated",
    expect_warning(pearson.dist(flu), "deprecated")
  )
}
r-hyperspec/hyperSpec documentation built on May 31, 2024, 5:53 p.m.