library(plotly) x <- sample(LETTERS, 1e6, replace = TRUE) tab <- table(x) plot_ly(x = names(tab), y = as.numeric(tab))