default_code_agg <- function(index) {
#If it's a number, sum, otherwise count distinct
if(is.numeric(index)==TRUE) {
sum(index)
} else {
length(unique(index))
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.