2026-08-12
{r setup, include=FALSE} knitr::opts_chunk_set(echo = FALSE, message = FALSE, warning = FALSE) library(plotly)
## My Interactive Plot
```r
install.packages("plotly", repos = "http://r-project.org")
## Installing package into '/usr/local/lib/R/site-library' ## (as 'lib' is unspecified)
## Warning: unable to access index for repository http://r-project.org/src/contrib: ## cannot open URL 'http://r-project.org/src/contrib/PACKAGES'
## Warning: package 'plotly' is not available (for R version 4.0.0)
library(plotly)
## Loading required package: 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
plot_ly(data = mtcars, x = ~wt, y = ~mpg, type = "scatter", mode = "markers")