If anyone how reviews this page could tell me how to make it in a for loop in r, I would be greatly appreciate for your help! Please send to my gmail address if you are willing to do me a help: jliangmkt@gmail.com
##Thanks Again.

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.new()

data("iris") #Call the iris dataset, which contained measured data about 50 flowers of each specy of iris

IRIS_plot_1<-plot_ly(iris,y=~iris[,1],type="box",color=~iris[,5]) %>% layout(title=names(iris)[1],yaxis=list(title=names(iris)[1]))
IRIS_plot_1
IRIS_plot_2<-plot_ly(iris,y=~iris[,2],type="box",color=~iris[,5]) %>% layout(title=names(iris)[2],yaxis=list(title=names(iris)[2]))
IRIS_plot_2
IRIS_plot_3<-plot_ly(iris,y=~iris[,3],type="box",color=~iris[,5]) %>% layout(title=names(iris)[3],yaxis=list(title=names(iris)[3]))
IRIS_plot_3
IRIS_plot_4<-plot_ly(iris,y=~iris[,4],type="box",color=~iris[,5]) %>% layout(title=names(iris)[4],yaxis=list(title=names(iris)[4]))
IRIS_plot_4

From each boxplot, we can see the different attribute of each specy of iris