[SPARK-20197][SPARKR] CRAN check fail with package installation
[SPARK-20197][SPARKR] CRAN check fail with package installation

## What changes were proposed in this pull request?

Test failed because SPARK_HOME is not set before Spark is installed.

Author: Felix Cheung <felixcheung_m@hotmail.com>

Closes #17516 from felixcheung/rdircheckincran.

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