Plotly_Exercise_for_Coursera

VICTOR CAMPOS

Oct/09/2022

Ploty package installation

This command installs the package for “Ploty”

Ploty is only required to be installed once. Afther the firs installation, it is not required to be installed in your computer anymore.

## Warning: package 'plotly' was built under R version 4.1.3
## Loading required package: ggplot2
## Warning: replacing previous import 'lifecycle::last_warnings' by
## 'rlang::last_warnings' when loading 'pillar'
## 
## 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

Plotly Graphic

Using a default midwest database for schools, the following command will graph the boxes of the information contained in the database.

fig <- plot_ly(midwest, x = ~percollege, color = ~state, type = "box")
fig