课程: R for Data Science: Lunch Break Lessons

免费学习该课程!

今天就开通帐号,24,100 门业界名师课程任您挑!

Default mirror

Default mirror

- [Instructor] To run our programs from the command line, you use rscript followed by the name of the program you want to run, in this case, 01_51_defaultMirror. Occasionally, you will see this error message. What's important to realize is it's trying to use CRAN without having set a mirror. In other words, you need to set a default mirror for R to find out where to install packages. And here's how to do that. First, go to a web browser and go to the R homepage. Go to Mirrors and scroll down to find the mirror nearest to your location. Right now, I'm in California, so I'll go down to the United States and we'll use University of California, Los Angeles, California. I'll copy that URL and then I'll go back to the terminal. I'm going to cd to my home directory. And then I'm going to use nano which is a command line editor, and I'm going to create a file called .rprofile. Into .rprofile, I'm going to insert the line options parenthesis repos equals structure parenthesis c parenthesis and…

内容