Download - R programming with mongoDB
![Page 1: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/1.jpg)
R Programming R Programming with MongoDBwith MongoDB
Prepare byPrepare byProf. B.A.KhivsaraProf. B.A.Khivsara
Assistant Professor, Assistant Professor, Department of Computer Engineering,Department of Computer Engineering,
SNJB’s K.B. Jain COE,ChandwadSNJB’s K.B. Jain COE,Chandwad
![Page 2: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/2.jpg)
Outline
![Page 3: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/3.jpg)
Outline
![Page 4: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/4.jpg)
R
![Page 5: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/5.jpg)
Installation of R
![Page 6: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/6.jpg)
Installation of R….
Click on Save File OptionClick on Save File Option
![Page 7: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/7.jpg)
Installation of R….
![Page 8: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/8.jpg)
Installation of R….
![Page 9: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/9.jpg)
Installation of R….
![Page 10: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/10.jpg)
Installation of R….
![Page 11: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/11.jpg)
Installation of R….
![Page 12: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/12.jpg)
Installation of R….
![Page 13: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/13.jpg)
Installation of R….
![Page 14: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/14.jpg)
Installation of R….
![Page 15: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/15.jpg)
Installation of R….
![Page 16: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/16.jpg)
Installation of R….
![Page 17: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/17.jpg)
Installation of R….
![Page 18: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/18.jpg)
R….First look
![Page 19: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/19.jpg)
R….First Command
![Page 20: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/20.jpg)
Outline
![Page 21: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/21.jpg)
Installation of R studio
![Page 22: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/22.jpg)
Installation of R studio….
![Page 23: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/23.jpg)
Installation of R studio…• Following page will be displayed click on suitable option that you
want to download(Here I downloaded Rstudio Desktop-Opensource)
![Page 24: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/24.jpg)
Installation of R studio…..
![Page 25: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/25.jpg)
Installation of R studio…..
Click on Save File OptionClick on Save File Option
![Page 26: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/26.jpg)
Installation of R studio…..
![Page 27: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/27.jpg)
R studio has Installed successfully
![Page 28: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/28.jpg)
Open R studio folder and click on bin folder
![Page 29: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/29.jpg)
Find rstudio in bin folder and click on it.
![Page 30: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/30.jpg)
![Page 31: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/31.jpg)
![Page 32: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/32.jpg)
• Ctr+L to clear console screen
![Page 33: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/33.jpg)
![Page 34: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/34.jpg)
Outline
![Page 35: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/35.jpg)
Installation of Mongo
![Page 36: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/36.jpg)
Outline
![Page 37: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/37.jpg)
RMongo & rjava Packages in RStudio
• Open Rstudio and on console write• >install.packages(“Rmongo”)• If error comes for Internet Connection then
– Set no proxy setting– Default browser set Internet Explorer
• In Rstudio Menu ->Tool ->Global Options -> Packages -> Uncheck use Inrenet explorer library/proxy for HTTP and try again to install.packages(“Rmongo”)
![Page 38: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/38.jpg)
RMongo & rjava Packages in RStudio
• In rignt side bottom window in Rstudio • Package tab• Check rjava and Rmongo• If error comes then need to install java
version from official website which will be compatible with R version you are using.
• If no error comes then write following command on console
• >help(package=Rmongo)
![Page 39: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/39.jpg)
Outline
![Page 40: R programming with mongoDB](https://reader035.vdocuments.net/reader035/viewer/2022081521/58ed0a911a28ab57058b4675/html5/thumbnails/40.jpg)
First RMongo Script/Programlibrary(RMongo)mg1<-mongoDbConnect('db1')dbShowCollections(mg1)dbInsertDocument(mg1,"stud",'{rno:1,name:"Amit"}')res<-dbGetQuery(mg1,'stud',"{ }")print(res)
•Note: Before running script make sure that Mongo Server is started.