Connect to MongoDB

Iam trying to connect to mongodb database through this library(RMongo)
and iam getting this error
Error in library(RMongo) : there is no package called ‘RMongo’

so i thought of installing the package then i get this comment
Installing package into ‘C:/Users/GIRI/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘RMongo’ is not available (for R version 3.6.2)

please help me out.

RMongo is no longer on CRAN (you could try downloading the source from the archive and compiling but is very likely going to fail) and is not been maintained. As an alternative you could use mongolite.