#' based on the base function boxplot (boxplot, or boxplot.stats) the outliers are detected and substituted with NA
#'
#' @param x vector or colummn of matrix/dataframe. (F.e. x$Datetime or x[1])
#' @param column numeric, the column where the outliers should be removed
#' @return returns the file with removed (filled NA) outlier values
#' @export
fill_outliersNA <- function(x,column){
boxplot <- boxplot.stats(x[column])
outliers <- boxplot[[4]]
outliers_unique <- unique(outliers)
rowstofillNA <- which(x[column] %in% outliers_unique)
x[rowstofillNA,] <- NA
return(x)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.