R/RstrIndex.R

Defines functions RstrIndex

#' ## **`RstrIndex()`**
#'
#' Assign NA to specified string value within dataframe. This function is written primarily for use with '`apply()`', '`sapply()`', '`vapply()`', and/or '`lapply()`' (`{pkg:base}`).
#'
RstrIndex <- function(x, str) {
    is.na(x) <- which(x == str)
    return(x)
}
EccRiley/Riley documentation built on Feb. 15, 2024, 9:29 a.m.