I have installed R 3.1.2. I want to install RMongo
package so that I can access my mongoDB database.I have downloaded RMongo-master.zip
file from GitHub. But I am not able to install this package. Please help me.
Asked
Active
Viewed 4,795 times
2

manishankar
- 35
- 1
- 5
3 Answers
3
To install packages from github, first install and load the devtools
package:
install.packages("devtools")
library(devtools)
Then use install_github
.
install_github("Rmongo", "tc")
Though in this case, Rmongo
is on CRAN, so you can just do:
install.packages("RMongo") //name of package is case sensitive

adhg
- 10,437
- 12
- 58
- 94

Richie Cotton
- 118,240
- 47
- 247
- 360
-
So I have to write the queries in R Gui or R studio?? – manishankar Nov 17 '14 at 12:32
-
Because when I am writing the 1st command i.e install.packages("devtools") in R Gui it shows the below errors i.e "Warning: unable to access index for repository http://ftp.iitm.ac.in/cran/bin/windows/contrib/3.1" and "Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.1" – manishankar Nov 17 '14 at 12:43
-
It doesn't matter if you use R GUI or RStudio or any other IDE. That warning occurs when R cannot access the internet (as well as when CRAN is offline). Do you have internet access on your machine? Are you on a corporate network where access is being blocked? In the former case, um, plug in the network cable. In the latter case, try `setInternet2()` (Windows only), or speak to your network admin. – Richie Cotton Nov 18 '14 at 07:16
-
2The `install_github` call failed to me (RStudio 1.1.436, R 3.4.4), I had to switch it to `install_github("tc/Rmongo")` – Matt Mar 02 '19 at 16:08
1
I have used below command. it's worked for me.
install.packages("devtools")
library(devtools)
install.packages("rJava")
library(rJava)
install_github("tc/Rmongo")

Prashant Sahoo
- 979
- 16
- 19