R/dssIsUnique.R

Defines functions dssIsUnique

Documented in dssIsUnique

#' @title Check if a vector is unique (tipically a dataframe column)
#' @param what a character name of the vector (or dataframe column specified with '$' - 'df$col')
#' @param  datasources a list of opal objects obtained after logging into the opal servers (see datashield.login)
#' @export
#'
dssIsUnique <- function(what, datasources = NULL){
  if(is.null(datasources)){
    datasources <- datashield.connections_find()
  }
  expr <- paste0('isUnique(', what,')')
 datashield.aggregate(datasources, as.symbol(expr), async = TRUE)

}
sib-swiss/dsSwissKnifeClient documentation built on July 16, 2025, 6:25 p.m.