library(datasets)
library(ggplot2)
library(dplyr)
library(rmarkdown)
library(plotly)
plot_ly(type = 'scatter', x = mtcars$hp, y = mtcars$mpg,text =paste("Make:",rownames(mtcars),"<br>cyl:",mtcars$cyl,"<br>disp:", mtcars$disp,"<br>qsec:",mtcars$qsec),hoeverinfo = 'text', color= as.factor(mtcars$cyl),mode = "markers")