R/setFilterDS.R

Defines functions setFilterDS

#' 
#' @title Sets the privacy level
#' @description This is an internal function that set the number of observation
#' that are allowed in any table or vector. The function gets the value from the data repository
#' and if no value was set it uses the default value 5.
#' @details The function is called by server side functios
#' @param x a dummy argument
#' @return an integer between 1 and 5
#' @keywords internal
#' @noRd
#' @author Gaye, A.
#'
setFilterDS <- function(x=getOption("datashield.privacyLevel", default=5)){
  a <- as.numeric(as.character(x))
  return(a)
}

Try the dsBase package in your browser

Any scripts or data that you put into this service are public.

dsBase documentation built on Aug. 8, 2025, 6:05 p.m.