library(plotly)
## Carregando pacotes exigidos: ggplot2
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
frequencia <- c(8208, 4944, 4661, 5824)
plot_ly(
labels = c("Escorpião", "Serpente", "Aranha", "Outros animais"),
values = c(frequencia[1], frequencia[2], frequencia[3], frequencia[4]),
type = "pie"
) %>%
layout(title = "Casos de Intoxicação por animal peçonhento",
showlegend = TRUE)