R markdown and Plotly

Abdallah Abdelsameia

June 27, 2020

The mtcars dataset using plotly

options(warn = -1)
suppressMessages(library(plotly))
suppressMessages(plot_ly(data = mtcars, x = mtcars$wt, y = mtcars$mpg, color = mtcars$cyl, type = "scatter"))
## No scatter mode specifed:
##   Setting the mode to markers
##   Read more about this attribute -> https://plot.ly/r/reference/#scatter-mode