#' @title Describe factors in a dataframe
#' @description Show the levels for all the factors in a remote dataframe
#' @param what a character name of the dataframe
#' @param show.all a logical, default FALSE. If FALSE it limits to the first 50 levels, otherwise it returns all of them.
#' @param async a logical, see datashield.aggregate
#' @param datasources a list of opal objects obtained after logging into the opal servers (see datashield.login)
#' @export
#'
dssShowFactors <- function(what, show.all = FALSE,async = TRUE, datasources = NULL){
if(is.null(datasources)){
datasources <- datashield.connections_find()
}
limit.levels <- as.character(!show.all)
expr <- paste0('showInfo(', what, ',"', limit.levels, '")')
out <- datashield.aggregate(datasources, as.symbol(expr), async = async)
return(out)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.