Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in R Programming by (7.3k points)

I'm trying to install a package through the R prompt by doing the following:

install.packages('RMySQL')

But the output is as follows:

--- Please select a CRAN mirror for use in this session ---

And nothing else! I can't find a solution to this very basic problem. What am I supposed to type in order to select a CRAN mirror?

EDIT:

OS: Mac-OS X 10.6.8 R Version: 2.15.0

1 Answer

0 votes
by

To specify a mirror for downloading packages, you can use the repos argument inside the install.packages function as follows:

install.packages('RMySQL', repos='http://cran.us.r-project.org')

You can choose your nearest mirror from the list of mirrors here.

You can also use the following function to select a cran mirror:

chooseCRANmirror()

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.1k users

Browse Categories

...