Make a regular old ggplot scatterplot with the iris data:
library(ggplot2)
p <- ggplot(iris, aes(Petal.Width, Sepal.Length, col=Species)) + geom_point()
p
Load the plotly library. Run ggplotly() around the plot object you just made. Instantly interactive! See https://plot.ly/ggplot2/ for more. Try hovering, clicking on the legend. In RStudio you can save as a webpage and embed elsewhere.
library(plotly)
ggplotly(p)