{R語言學習日記}Day3 環(huán)境搭建

大家好,我是William李梓峰,歡迎閱讀我的 R 語言學習日記。

官網(wǎng)鏈接:
https://www.tutorialspoint.com/r/r_environment_setup.htm

Local Environment Setup

本地環(huán)境搭建

If you are still willing to set up your environment for R, you can follow the steps given below.
如果你愿意搭建 R 語言環(huán)境,你可以遵尋以下步驟。

Windows Installation

Windows 平臺下的安裝

You can download the Windows installer version of R from R-3.2.2 for Windows (32/64 bit) and save it in a local directory.
你可以下載 Windows 安裝包 R-3.2.2 版本(32/64位)并保存到本地路徑。

As it is a Windows installer (.exe) with a name "R-version-win.exe". You can just double click and run the installer accepting the default settings. If your Windows is 32-bit version, it installs the 32-bit version. But if your windows is 64-bit, then it installs both the 32-bit and 64-bit versions.
那個Windows 安裝包(.exe)以 “R-version-win.exe” 命名。你只需在默認配置下雙擊并運行安裝包。如果你的 Windows 是32位版本的,它就會只安裝32位的版本。但如果你的 Windows 是64位的,則它會安裝32位和64位的版本。

After installation you can locate the icon to run the Program in a directory structure "R\R3.2.2\bin\i386\Rgui.exe" under the Windows Program Files. Clicking this icon brings up the R-GUI which is the R console to do R Programming.
在安裝完以后,你可以通過R語言的圖標去運行 R ,一般安裝位置在Windows 的 Program Files 下的 “R\R3.2.2\bin\i386\Rgui.exe”。點擊 R 語言的圖標去啟動 R-GUI 程序,在 R 控制臺下去寫 R 代碼。

Linux Installation

Linux 安裝

R is available as a binary for many versions of Linux at the location R Binaries.
R 有很多 Linux 運行版本。

The instruction to install Linux varies from flavor to flavor. These steps are mentioned under each type of Linux version in the mentioned link. However, if you are in a hurry, then you can use yum command to install R as follows ?
在 Linux 安裝 R 語言環(huán)境有很多方法。但是,如果你想快點搞完,你可以使用 yum 命令去安裝 R :

$ yum install R

Above command will install core functionality of R programming along with standard packages, still you need additional package, then you can launch R prompt as follows ?
上面的命令將安裝 R 語言的標準核心包,則若你需要額外包,則你可以打開 R語言終端 -

$ R

R version 3.2.0 (2015-04-16) -- "Full of  Ingredients"          
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)
        
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
            
R is a collaborative project with many  contributors.                    
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
       
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

>  

Now you can use install command at R prompt to install the required package. For example, the following command will install plotrix package which is required for 3D charts.
現(xiàn)在你可以在 R 語言終端使用安裝命令去在線安裝其他包。例如,下面的命令就會安裝一些 3D 圖表包。

install.packages("plotrix")

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
【社區(qū)內容提示】社區(qū)部分內容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發(fā)布,文章內容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內容

友情鏈接更多精彩內容