#' Vector Names for Strict Half-Vectorization
#'
#' Returns a character vector of length `0.5 * k * (k + 1) - k`
#' from an input vector `x` of length `k`.
#'
#' @author Ivan Jacob Agaloos Pesigan
#'
#' @inherit vechnames return
#' @inheritParams vechnames
#'
#' @examples
#' x <- diag(2)
#' colnames(x) <- rownames(x) <- c("x1", "x2")
#' vechsnames(colnames(x))
#'
#' x <- diag(3)
#' colnames(x) <- rownames(x) <- c("x1", "x2", "x3")
#' vechsnames(colnames(x))
#' @family Vectorization Functions
#' @keywords linearAlgebra vectorization
#' @export
vechsnames <- function(x,
sep = ".") {
stopifnot(
is.vector(x),
length(sep) == 1
)
.vechsnames(
x = x,
sep = sep
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.