R and RStudio installation tutorial
1. What is R
R是用于统计分析、绘图的语言和操作环境。
R is a free, free, and open source software belonging to the GNU system. It is an excellent tool for statistical calculations and statistical graphics. Simply put, R is a statistical computing language and a set of open source data analysis solutions.
Second, what is RStudio
RStudio is an IDE of R language. R's own environment may not be convenient to operate. Rstudio solves this problem well. It also has debugging, visualization and other functions. It supports pure R scripts, Rmarkdown (mixed scripts and documents). Arrangement), Bookdown (the script documents are mixed into a book), Shiny (interactive network application), etc.
Three, R and RStudio instructions before installation
Installation sequence : (1) R (2) RStudio
R is the foundation of RStudio 必须先安装R,再安装RStudio
.
Even if you only use RStudio, you still need to install R for your computer in advance.
RStudio is just a tool to assist you in editing with R, because it does not come with R programs.
Fourth, install R
1. Log in to R's official website
Link: https://www.r-project.org/
2. Click CRAN under Download in the upper left corner
3. Go to the download page
4. Pull down to find the China site, select a mirror and click to enter
5. Under Download and Install R , Select the corresponding version. My computer is Windows, so I choose the third download
6. Click base
7, click the link Download R 3.5.1 for Windows, and start downloading R version 3.5.1, about 79MB
8. After the download is complete, install it
Five, install RStudio
1. Open the official website of RStudio
Link: https://www.rstudio.com/products/rstudio/download/
Click Download under Free
2. Then it will automatically jump to the download link. In "Installers for Supported Platforms", select the appropriate version for your system.
3. I chose to download "RStudio 1.1.456-Windows Vista/7/8/10"
4. After downloading, open the program and enter the installation wizard, click Next
5. Set the installation path
6. Install the next step
7. According to your own The choice of the number of bits of the computer operating system, but 64-bit systems can all be selected, because 64-bit is backward compatible with 32-bit systems.
8. Startup option, No.
9 is selected by default , 10 is being installed
, the installation is complete and a desktop shortcut is generated
Six, test whether the software installation is successful
1. Double-click RStudio to open the IDE.
2. Type 1+1 and press Enter+Ctrl to run.
3. Get the result 2. The calculation is correct and the installation is successful.
Seven, RStudio interface introduction
After opening RStudio, the window shown above will appear with three independent panels. The largest panel is the console window, which is the place to run R code and view the output. That is, the console window you see when running native R. Other panels are unique to RStudio. Hidden in these panels include a text editor, a drawing interface, a code debugging window, a file management window and so on.
Reference from the link: https://www.jianshu.com/p/1a0f25086e8b