[SPARK-11221][SPARKR] fix R doc for lit and add examples
[SPARK-11221][SPARKR] fix R doc for lit and add examples

Currently the documentation for `lit` is inconsistent with doc format, references "Scala symbol" and has no example. Fixing that.
shivaram

Author: felixcheung <felixcheung_m@hotmail.com>

Closes #9187 from felixcheung/rlit.

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