#' Assign detect/non-detect to sampling data
#'
#' Assign detect flags to data
#'
#' @param x a character vector values
#'
#' @export
#'
#' @details This function assigns detect/non-detect/greater than detect (D/ND/GD) based on the presence of a "<" or ">" flag attached to the sampling result value.
#' Currently, this function is used in conjunction with \code{nd_remover}
#'
#' @examples
#' \dontrun{
#' x <- c('0.24', '>0.25', '2', '>0.5', '<2.5', '<6')
#' nd_classifier(x)
#'
#' x <- c(' 0.24', '> 0.25', '2 ', '>.5', '<2.5', '< 6')
#' nd_classifier(x)
#' }
#'
#' @return Returns a character vector
#'
#' @seealso \code{nd_remover}
#'
#' @author Julie Padilla
#'
#' @concept wrangling
#'
nd_classifier <- function(x){
ifelse(grepl('<', x), "ND", ifelse(grepl('>', x), "GD", "D"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.