setup_called <- function(sc){
called_situations <- c("blocked ball", "ball",
"called_strike")
filter(sc, description %in%
called_situations) %>%
mutate(Strike = ifelse(description ==
"called_strike", 1, 0),
Count = paste(balls, strikes, sep="-"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.