#' limlabel
#'
#' Indiquer si un point est un outlier ou non
#'
#' @param x data.
#' @param limref tableau indiquant les limites de références (créé par \code{.limref()}).
#' @param cvslabel CVSréf à partir duquel on identifie les outliers.
#'
#' @return data + variable outlier
#' @import data.table
#' @keywords internal
#' @export
limlabel <- function(x, limref, cvslabel){
cols <- c("an", "code", "descriptif", "region", "CVS", "thetaj") # colonnes à conserver
x <- x[, ..cols] # sélection des colonnes
lim <- limref[cvs == cvslabel]$valeur # limites pour outliers
x[, Outlier := "Non"]
x[thetaj < min(lim) | thetaj > max(lim), Outlier := "Oui"] # indiquer si outlier
return(x)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.