#' function replaces every value below a threshold with NA
#'
#' @param file object containing data (data frame, matrix, array)
#' @param column column in object containing data to apply the function on
#' @param threshold every value <= threshold gets replaced with NA
#' @return file with replaced values
#' @export
remove_threshold <- function(file, column, threshold){
outlier <- which(file[column] <= threshold ) ## <- values to replace
file[outlier,column] <- NA
return(file)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.