目录

R - 环境设置( Environment Setup)

本地环境设置 (Local Environment Setup)

如果您仍然愿意为R设置环境,则可以按照以下步骤操作。

Windows安装 (Windows Installation)

您可以从R-3.2.2 for Windows(32/64位)下载R的Windows安装程序版本,并将其保存在本地目录中。

因为它是一个名为“R-version-win.exe”的Windows安装程序(.exe)。 您只需双击并运行安装程序即可接受默认设置。 如果您的Windows是32位版本,则会安装32位版本。 但如果您的Windows是64位,那么它会安装32位和64位版本。

安装后,您可以找到该图标,以便在Windows程序文件下的目录结构“R\R3.2.2\bin\i386\Rgui.exe”中运行本程序。 单击此图标将显示R-GUI,它是进行R编程的R控制台。

Linux安装

R可用作R Binaries位置的许多Linux版本的二进制文件

安装Linux的说明因风味而异。 在上述链接中的每种类型的Linux版本中都提到了这些步骤。 但是,如果你赶时间,那么可以使用yum命令安装R,如下所示 -

$ yum install R

上面的命令将安装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.
>  

现在,您可以在R提示符下使用install命令来安装所需的包。 例如,以下命令将安装3D图表所需的plotrix包。

> install.packages("plotrix")
<上一篇.R - 概述
R - Basic 语法.下一篇>
↑回到顶部↑
WIKI教程 @2018