# Function -------------------------------------------------------------------
#' @name DEPRECATED-isample
#' @concept deprecated
#'
#' @title (DEPRECATED)
#' Return vector of row indices
#'
#' @description
#'
#' This function is **deprecated**.
#' Use `sample(..., index = TRUE)` instead.
#'
#' @param ... Arguments to [hyperSpec::sample()].
#'
#' @export
isample <- function(...) {
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hySpc_deprecated("sample(..., index = TRUE)")
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sample(..., index = TRUE)
}
# Unit tests -----------------------------------------------------------------
hySpc.testthat::test(isample) <- function() {
context("isample")
test_that("deprecated", expect_warning(isample(flu), "deprecated"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.