[SPARK-12364][ML][SPARKR] Add ML example for SparkR
[SPARK-12364][ML][SPARKR] Add ML example for SparkR

We have DataFrame example for SparkR, we also need to add ML example under ```examples/src/main/r```.

cc mengxr jkbradley shivaram

Author: Yanbo Liang <ybliang8@gmail.com>

Closes #10324 from yanboliang/spark-12364.

rikima/spark,srowen/spark,gioenn/xSpark,chuckchen/spark,highfei2011/spark,panfengfeng/spark,yanboliang/spark,rednaxelafx/apache-spark,markhamstra/spark,nilsgrabbert/spark,metamx/spark,rednaxelafx/apache-spark,holdenk/spark,nlalevee/spark,wangmiao1981/spark,eyalfa/spark,publicRoman/spark,ron8hu/spark,nlalevee/spark,zuotingbing/spark,Panos-Bletsos/spark-cost-model-optimizer,rezasafi/spark,dhruve/spark,big-pegasus/spark,kissmetrics/spark,HyukjinKwon/spark,Panos-Bletsos/spark-cost-model-optimizer,zzcclp/spark,stanzhai/spark,ddna1021/spark,yanboliang/spark,bOOm-X/spark,facaiy/spark,techaddict/spark,hvanhovell/spark,liutang123/spark,ron8hu/spark,bdrillard/spark,kimoonkim/spark,liyichao/spark,jiangxb1987/spark,apache/spark,mike0sv/spark,shaneknapp/spark,pgandhi999/spark,WeichenXu123/spark,stanzhai/spark,jkbradley/spark,SHASHANKB/spark,yanboliang/spark,setjet/spark,aray/spark,bravo-zhang/spark,hvanhovell/spark,xflin/spark,esi-mineset/spark,ibm-research-ireland/sparkoscope,big-pegasus/spark,nchammas/spark,taroplus/spark,saltstar/spark,1haodian/spark,aosagie/spark,jrshust/spark,sahilTakiar/spark,rednaxelafx/apache-spark,gengliangwang/spark,kimoonkim/spark,map222/spark,wangmiao1981/spark,eyalfa/spark,shubhamchopra/spark,setjet/spark,byakuinss/spark,debugger87/spark,lvdongr/spark,actuaryzhang/spark,zhouyejoe/spark,poffuomo/spark,icexelloss/spark,janewangfb/spark,jrshust/spark,caneGuy/spark,hhbyyh/spark,WindCanDie/spark,xflin/spark,MLnick/spark,sahilTakiar/spark,lxsmnv/spark,nilsgrabbert/spark,poffuomo/spark,icexelloss/spark,zzcclp/spark,lxsmnv/spark,milliman/spark,1haodian/spark,szhem/spark,narahari92/spark,SnappyDataInc/spark,debugger87/spark,bOOm-X/spark,wzhfy/spark,mahak/spark,nlalevee/spark,ibm-research-ireland/sparkoscope,MLnick/spark,skonto/spark,BryanCutler/spark,maropu/spark,patrick-nicholson/spark,witgo/spark,sachintyagi22/spark,SHASHANKB/spark,JerryLead/spark,rezasafi/spark,publicRoman/spark,mzl9039/spark,cin/spark,srowen/spark,ibm-research-ireland/sparkoscope,sachintyagi22/spark,JerryLead/spark,andrewor14/spark,gioenn/xSpark,darionyaphet/spark,minixalpha/spark,jrshust/spark,mike0sv/spark,xuanyuanking/spark,shubhamchopra/spark,guoxiaolongzte/spark,Aegeaner/spark,big-pegasus/spark,chuckchen/spark,liyichao/spark,hvanhovell/spark,janewangfb/spark,someorz/spark,mdespriee/spark,apache-spark-on-k8s/spark,hvanhovell/spark,sachintyagi22/spark,JoshRosen/spark,szhem/spark,holdenk/spark,apache/spark,kimoonkim/spark,liyichao/spark,cin/spark,gengliangwang/spark,wangyum/spark,rikima/spark,maropu/spark,mdespriee/spark,actuaryzhang/spark,mike0sv/spark,SHASHANKB/spark,lvdongr/spark,nilsgrabbert/spark,zhouyejoe/spark,SHASHANKB/spark,ueshin/apache-spark,poffuomo/spark,rekhajoshm/spark,saltstar/spark,bdrillard/spark,SHASHANKB/spark,mdespriee/spark,gengliangwang/spark,dbtsai/spark,Panos-Bletsos/spark-cost-model-optimizer,mzl9039/spark,sachintyagi22/spark,lvdongr/spark,minixalpha/spark,gioenn/xSpark,aokolnychyi/spark,spark-test/spark,milliman/spark,kissmetrics/spark,shubhamchopra/spark,ueshin/apache-spark,goldmedal/spark,jlopezmalla/spark,shuangshuangwang/spark,joseph-torres/spark,joseph-torres/spark,setjet/spark,brad-kaiser/spark,alunarbeach/spark,alunarbeach/spark,minixalpha/spark,saturday-shi/spark,markhamstra/spark,techaddict/spark,apache/spark,goldmedal/spark,tengpeng/spark,caneGuy/spark,tejasapatil/spark,ddna1021/spark,darionyaphet/spark,mahak/spark,dhruve/spark,alunarbeach/spark,HyukjinKwon/spark,Aegeaner/spark,apache-spark-on-k8s/spark,nlalevee/spark,maropu/spark,sureshthalamati/spark,brad-kaiser/spark,ajaysaini725/spark,dongjoon-hyun/spark,kimoonkim/spark,ioana-delaney/spark,yanboliang/spark,publicRoman/spark,1haodian/spark,metamx/spark,highfei2011/spark,rezasafi/spark,JoshRosen/spark,sahilTakiar/spark,xuanyuanking/spark,eyalfa/spark,joseph-torres/spark,adrian-ionescu/apache-spark,witgo/spark,zhouyejoe/spark,spark-test/spark,lxsmnv/spark,rekhajoshm/spark,nchammas/spark,milliman/spark,spark-test/spark,byakuinss/spark,ptkool/spark,rednaxelafx/apache-spark,aokolnychyi/spark,jianran/spark,skonto/spark,1haodian/spark,JoshRosen/spark,patrick-nicholson/spark,liyichao/spark,kevinyu98/spark,narahari92/spark,patrick-nicholson/spark,nchammas/spark,wangmiao1981/spark,Aegeaner/spark,patrick-nicholson/spark,brad-kaiser/spark,srowen/spark,ddna1021/spark,caneGuy/spark,sureshthalamati/spark,rikima/spark,pgandhi999/spark,jkbradley/spark,jkbradley/spark,esi-mineset/spark,kimoonkim/spark,setjet/spark,ron8hu/spark,ahnqirage/spark,ericvandenbergfb/spark,akopich/spark,jrshust/spark,tengpeng/spark,dongjoon-hyun/spark,apache-spark-on-k8s/spark,loneknightpy/spark,rezasafi/spark,liyichao/spark,zzcclp/spark,map222/spark,ioana-delaney/spark,maropu/spark,liyichao/spark,techaddict/spark,adrian-ionescu/apache-spark,gengliangwang/spark,jlopezmalla/spark,jianran/spark,wangmiao1981/spark,hvanhovell/spark,mdespriee/spark,saturday-shi/spark,UndeadBaneGitHub/spark,dhruve/spark,SHASHANKB/spark,adrian-ionescu/apache-spark,patrick-nicholson/spark,darionyaphet/spark,zhouyejoe/spark,dhruve/spark,sahilTakiar/spark,liutang123/spark,ahnqirage/spark,pgandhi999/spark,markhamstra/spark,narahari92/spark,icexelloss/spark,witgo/spark,apache/spark,michalsenkyr/spark,rezasafi/spark,jiangxb1987/spark,SHASHANKB/spark,highfei2011/spark,jianran/spark,facaiy/spark,ahnqirage/spark,wangmiao1981/spark,szhem/spark,dongjoon-hyun/spark,ioana-delaney/spark,bdrillard/spark,rednaxelafx/apache-spark,WeichenXu123/spark,akopich/spark,bdrillard/spark,gioenn/xSpark,jkbradley/spark,ahnqirage/spark,BryanCutler/spark,aosagie/spark,narahari92/spark,actuaryzhang/spark,liutang123/spark,xflin/spark,pgandhi999/spark,JerryLead/spark,metamx/spark,taroplus/spark,bravo-zhang/spark,kiszk/spark,wangyum/spark,rezasafi/spark,chuckchen/spark,JoshRosen/spark,ptkool/spark,huang1900/spark,byakuinss/spark,zzcclp/spark,rikima/spark,gioenn/xSpark,xuanyuanking/spark,loneknightpy/spark,joseph-torres/spark,ericvandenbergfb/spark,saturday-shi/spark,mahak/spark,hvanhovell/spark,byakuinss/spark,vinodkc/spark,apache-spark-on-k8s/spark,stanzhai/spark,nilsgrabbert/spark,huang1900/spark,hhbyyh/spark,MLnick/spark,aosagie/spark,liutang123/spark,ericvandenbergfb/spark,kevinyu98/spark,ahnqirage/spark,rikima/spark,spark-test/spark,facaiy/spark,kissmetrics/spark,ron8hu/spark,holdenk/spark,huang1900/spark,skonto/spark,chuckchen/spark,zuotingbing/spark,joseph-torres/spark,bOOm-X/spark,map222/spark,ron8hu/spark,gengliangwang/spark,kissmetrics/spark,someorz/spark,shubhamchopra/spark,akopich/spark,nlalevee/spark,metamx/spark,saturday-shi/spark,srowen/spark,LantaoJin/spark,kiszk/spark,icexelloss/spark,sureshthalamati/spark,gengliangwang/spark,ConeyLiu/spark,huang1900/spark,nlalevee/spark,WindCanDie/spark,gioenn/xSpark,LantaoJin/spark,xuanyuanking/spark,cloud-fan/spark,nchammas/spark,akopich/spark,jlopezmalla/spark,tejasapatil/spark,mzl9039/spark,sachintyagi22/spark,aray/spark,goldmedal/spark,dongjoon-hyun/spark,janewangfb/spark,chuckchen/spark,cin/spark,shaneknapp/spark,ibm-research-ireland/sparkoscope,icexelloss/spark,sahilTakiar/spark,cin/spark,ptkool/spark,big-pegasus/spark,lxsmnv/spark,andrewor14/spark,caneGuy/spark,WindCanDie/spark,cin/spark,kimoonkim/spark,ioana-delaney/spark,hhbyyh/spark,hhbyyh/spark,kiszk/spark,WindCanDie/spark,liutang123/spark,WindCanDie/spark,aokolnychyi/spark,xflin/spark,panfengfeng/spark,saltstar/spark,tejasapatil/spark,metamx/spark,xuanyuanking/spark,setjet/spark,WeichenXu123/spark,shuangshuangwang/spark,alunarbeach/spark,aray/spark,setjet/spark,aosagie/spark,map222/spark,sachintyagi22/spark,ron8hu/spark,loneknightpy/spark,sureshthalamati/spark,milliman/spark,actuaryzhang/spark,szhem/spark,Panos-Bletsos/spark-cost-model-optimizer,hvanhovell/spark,LantaoJin/spark,zero323/spark,ahnqirage/spark,ajaysaini725/spark,someorz/spark,xflin/spark,shubhamchopra/spark,rekhajoshm/spark,akopich/spark,setjet/spark,jrshust/spark,UndeadBaneGitHub/spark,andrewor14/spark,zuotingbing/spark,shuangshuangwang/spark,LantaoJin/spark,ioana-delaney/spark,ueshin/apache-spark,jiangxb1987/spark,markhamstra/spark,ddna1021/spark,sureshthalamati/spark,rekhajoshm/spark,vinodkc/spark,UndeadBaneGitHub/spark,caneGuy/spark,bOOm-X/spark,ericvandenbergfb/spark,bdrillard/spark,milliman/spark,chuckchen/spark,MLnick/spark,map222/spark,kevinyu98/spark,shaneknapp/spark,kiszk/spark,jiangxb1987/spark,ddna1021/spark,JerryLead/spark,ConeyLiu/spark,shaneknapp/spark,saturday-shi/spark,LantaoJin/spark,kimoonkim/spark,HyukjinKwon/spark,guoxiaolongzte/spark,rednaxelafx/apache-spark,sahilTakiar/spark,aokolnychyi/spark,publicRoman/spark,ptkool/spark,bravo-zhang/spark,aosagie/spark,akopich/spark,jiangxb1987/spark,huang1900/spark,skonto/spark,bravo-zhang/spark,techaddict/spark,lvdongr/spark,taroplus/spark,ptkool/spark,michalsenkyr/spark,techaddict/spark,ajaysaini725/spark,gioenn/xSpark,minixalpha/spark,kevinyu98/spark,zhouyejoe/spark,maropu/spark,tengpeng/spark,hhbyyh/spark,saltstar/spark,szhem/spark,techaddict/spark,MLnick/spark,tejasapatil/spark,aokolnychyi/spark,mike0sv/spark,caneGuy/spark,janewangfb/spark,panfengfeng/spark,ron8hu/spark,cloud-fan/spark,eyalfa/spark,panfengfeng/spark,skonto/spark,wangyum/spark,aosagie/spark,panfengfeng/spark,ibm-research-ireland/sparkoscope,ericvandenbergfb/spark,brad-kaiser/spark,brad-kaiser/spark,shuangshuangwang/spark,actuaryzhang/spark,hhbyyh/spark,wzhfy/spark,SnappyDataInc/spark,kissmetrics/spark,markhamstra/spark,ConeyLiu/spark,goldmedal/spark,shubhamchopra/spark,shuangshuangwang/spark,jianran/spark,srowen/spark,tejasapatil/spark,stanzhai/spark,aosagie/spark,MLnick/spark,dongjoon-hyun/spark,ddna1021/spark,wzhfy/spark,dhruve/spark,panfengfeng/spark,WindCanDie/spark,pgandhi999/spark,shuangshuangwang/spark,mahak/spark,zero323/spark,jrshust/spark,tengpeng/spark,tejasapatil/spark,saltstar/spark,ajaysaini725/spark,jkbradley/spark,yanboliang/spark,eyalfa/spark,minixalpha/spark,milliman/spark,lxsmnv/spark,ibm-research-ireland/sparkoscope,byakuinss/spark,lvdongr/spark,vinodkc/spark,zero323/spark,adrian-ionescu/apache-spark,cloud-fan/spark,andrewor14/spark,nchammas/spark,rekhajoshm/spark,dhruve/spark,1haodian/spark,janewangfb/spark,zzcclp/spark,akopich/spark,mzl9039/spark,WeichenXu123/spark,apache/spark,ericvandenbergfb/spark,adrian-ionescu/apache-spark,guoxiaolongzte/spark,nlalevee/spark,SnappyDataInc/spark,highfei2011/spark,maropu/spark,shubhamchopra/spark,guoxiaolongzte/spark,sureshthalamati/spark,jkbradley/spark,Panos-Bletsos/spark-cost-model-optimizer,alunarbeach/spark,jlopezmalla/spark,wzhfy/spark,stanzhai/spark,jrshust/spark,rekhajoshm/spark,maropu/spark,yanboliang/spark,bOOm-X/spark,ueshin/apache-spark,nilsgrabbert/spark,SnappyDataInc/spark,ajaysaini725/spark,nilsgrabbert/spark,Aegeaner/spark,bOOm-X/spark,shaneknapp/spark,BryanCutler/spark,mzl9039/spark,cloud-fan/spark,guoxiaolongzte/spark,sachintyagi22/spark,xuanyuanking/spark,WeichenXu123/spark,zero323/spark,HyukjinKwon/spark,eyalfa/spark,ConeyLiu/spark,kevinyu98/spark,aray/spark,srowen/spark,michalsenkyr/spark,alunarbeach/spark,LantaoJin/spark,actuaryzhang/spark,HyukjinKwon/spark,jianran/spark,WeichenXu123/spark,mzl9039/spark,andrewor14/spark,poffuomo/spark,goldmedal/spark,xflin/spark,big-pegasus/spark,Panos-Bletsos/spark-cost-model-optimizer,saltstar/spark,poffuomo/spark,LantaoJin/spark,zuotingbing/spark,holdenk/spark,bravo-zhang/spark,mzl9039/spark,andrewor14/spark,Aegeaner/spark,loneknightpy/spark,szhem/spark,icexelloss/spark,wangmiao1981/spark,guoxiaolongzte/spark,vinodkc/spark,dongjoon-hyun/spark,zero323/spark,goldmedal/spark,shaneknapp/spark,Panos-Bletsos/spark-cost-model-optimizer,facaiy/spark,byakuinss/spark,skonto/spark,aokolnychyi/spark,kissmetrics/spark,highfei2011/spark,techaddict/spark,JerryLead/spark,witgo/spark,ericvandenbergfb/spark,nilsgrabbert/spark,vinodkc/spark,apache-spark-on-k8s/spark,rezasafi/spark,cin/spark,1haodian/spark,zuotingbing/spark,publicRoman/spark,aray/spark,wangyum/spark,esi-mineset/spark,jkbradley/spark,mike0sv/spark,ibm-research-ireland/sparkoscope,tengpeng/spark,kissmetrics/spark,szhem/spark,mdespriee/spark,bravo-zhang/spark,ptkool/spark,taroplus/spark,darionyaphet/spark,loneknightpy/spark,ueshin/apache-spark,JerryLead/spark,ptkool/spark,bdrillard/spark,big-pegasus/spark,panfengfeng/spark,spark-test/spark,tengpeng/spark,eyalfa/spark,jianran/spark,apache-spark-on-k8s/spark,jianran/spark,BryanCutler/spark,tengpeng/spark,lvdongr/spark,minixalpha/spark,lxsmnv/spark,zuotingbing/spark,bOOm-X/spark,xuanyuanking/spark,map222/spark,SnappyDataInc/spark,stanzhai/spark,darionyaphet/spark,sahilTakiar/spark,matthewfranglen/spark,cloud-fan/spark,WindCanDie/spark,mahak/spark,UndeadBaneGitHub/spark,ajaysaini725/spark,poffuomo/spark,publicRoman/spark,spark-test/spark,ConeyLiu/spark,esi-mineset/spark,icexelloss/spark,ConeyLiu/spark,aray/spark,aray/spark,milliman/spark,wangyum/spark,debugger87/spark,markhamstra/spark,yanboliang/spark,vinodkc/spark,HyukjinKwon/spark,jlopezmalla/spark,someorz/spark,someorz/spark,dbtsai/spark,BryanCutler/spark,hhbyyh/spark,ueshin/apache-spark,kevinyu98/spark,someorz/spark,witgo/spark,ioana-delaney/spark,map222/spark,highfei2011/spark,highfei2011/spark,JoshRosen/spark,jiangxb1987/spark,holdenk/spark,skonto/spark,ConeyLiu/spark,wzhfy/spark,ahnqirage/spark,esi-mineset/spark,darionyaphet/spark,stanzhai/spark,Aegeaner/spark,chuckchen/spark,zero323/spark,michalsenkyr/spark,dbtsai/spark,mahak/spark,jlopezmalla/spark,rikima/spark,andrewor14/spark,janewangfb/spark,michalsenkyr/spark,sureshthalamati/spark,lvdongr/spark,joseph-torres/spark,WeichenXu123/spark,BryanCutler/spark,darionyaphet/spark,wzhfy/spark,nchammas/spark,debugger87/spark,wangyum/spark,kiszk/spark,dbtsai/spark,big-pegasus/spark,esi-mineset/spark,apache/spark,UndeadBaneGitHub/spark,kiszk/spark,ueshin/apache-spark,kiszk/spark,loneknightpy/spark,UndeadBaneGitHub/spark,mdespriee/spark,UndeadBaneGitHub/spark,narahari92/spark,lxsmnv/spark,spark-test/spark,kevinyu98/spark,pgandhi999/spark,minixalpha/spark,saltstar/spark,zhouyejoe/spark,mahak/spark,huang1900/spark,witgo/spark,cin/spark,joseph-torres/spark,jiangxb1987/spark,dhruve/spark,JoshRosen/spark,facaiy/spark,dongjoon-hyun/spark,saturday-shi/spark,xflin/spark,publicRoman/spark,guoxiaolongzte/spark,rekhajoshm/spark,michalsenkyr/spark,ddna1021/spark,cloud-fan/spark,rednaxelafx/apache-spark,apache/spark,shuangshuangwang/spark,esi-mineset/spark,someorz/spark,alunarbeach/spark,facaiy/spark,jlopezmalla/spark,liyichao/spark,wangyum/spark,shaneknapp/spark,narahari92/spark,saturday-shi/spark,mike0sv/spark,pgandhi999/spark,JerryLead/spark,taroplus/spark,debugger87/spark,dbtsai/spark,brad-kaiser/spark,narahari92/spark,aokolnychyi/spark,BryanCutler/spark,wzhfy/spark,zero323/spark,mike0sv/spark,bravo-zhang/spark,loneknightpy/spark,zhouyejoe/spark,zzcclp/spark,nchammas/spark,MLnick/spark,goldmedal/spark,taroplus/spark,ioana-delaney/spark,ajaysaini725/spark,adrian-ionescu/apache-spark,dbtsai/spark,dbtsai/spark,holdenk/spark,liutang123/spark,brad-kaiser/spark,witgo/spark,metamx/spark,gengliangwang/spark,holdenk/spark,rikima/spark,janewangfb/spark,debugger87/spark,srowen/spark,liutang123/spark,michalsenkyr/spark,patrick-nicholson/spark,adrian-ionescu/apache-spark,facaiy/spark,patrick-nicholson/spark,metamx/spark,poffuomo/spark,Aegeaner/spark,zzcclp/spark,SnappyDataInc/spark,mdespriee/spark,wangmiao1981/spark,apache-spark-on-k8s/spark,SnappyDataInc/spark,zuotingbing/spark,caneGuy/spark,actuaryzhang/spark,huang1900/spark,bdrillard/spark,vinodkc/spark,JoshRosen/spark,markhamstra/spark,debugger87/spark,tejasapatil/spark,byakuinss/spark,taroplus/spark,1haodian/spark,HyukjinKwon/spark,cloud-fan/spark