From the course: R Programming in Data Science: High Velocity Data

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Setting a default CRAN mirror

Setting a default CRAN mirror

From the course: R Programming in Data Science: High Velocity Data

Start my 1-month free trial

Setting a default CRAN mirror

- [Instructor] Because you're running R in a terminal window on a Macintosh, you may be receiving a common error message regarding setting a mirror, or contribute URL. The problem is you have not set a default mirror to install packages from. This is what it looks like. Error in contrib.url trying to use CRAN without setting a mirror. Let's step through what you'll need to do in order to fix that error. The first thing you'll need to do is go look at a list of mirrors. You can find that at the www.r-project.org homepage. Click on CRAN, which will give you a list of all of the mirrors of the CRAN libraries. Scroll down and find a location near you. In my case, it's the United States, and I'm going to choose the UCLA CRAN mirror from the University of California, Los Angeles, California. I'm interested in the URL http://cran.stat.ucla.edu. Go back to a terminal window and CD to your home directory, CD ~. And we're going to edit something called .rprofile. I'm going to use nano to edit…

Contents