to_binary <- function(y){
base_char <- unique(y)
yx <- as.numeric(as.factor(y))
yx <- ifelse(yx == 1, 0, 1)
return(list(base_char = base_char, y = yx))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.