梦入琼楼寒有月,行过石树冻无烟

安装R语言

R语言为我们提供了全平台的下载方式,其中主要分为Linux、Windows、Mac等操作系统,本书我们以Linux opensuse系统为例进行安装,如果您当前的发行系统不是opensuse,可以通过访问https://cloud.r-project.org/bin/linux/ 进行下载,r语言为我们提供了 debian、fedora、redhat、suse、ubuntu等发行版的下载。

R

https://cloud.r-project.org/bin/linux/suse/README.html 在这个页面之中选择当前opensuse版本进行下载,推荐使用火狐浏览器,因为可以直接识别出文件自动进行安装,安装之后打开终端输入 R即可,出现以下信息:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
R version 3.5.0 (2018-04-23) -- "Joy in Playing"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-suse-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.

Natural language support but running in an English locale

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.

>

输出Hello,world!

1
2
3
> print("Hello,world!")
[1] "Hello,world!"
>

RStudio

RStudio是专注与R语言的集成开发环境,由JJ Allaire小组进行设计,我们可通过官网https://rstudio.com/进行下载,当然本书使用opensuse Linux系统环境,可以使用其自带的软件仓库直接进行安装:https://software.opensuse.org/package/rstudio

输出 hello,world!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
R version 3.5.0 (2018-04-23) -- "Joy in Playing"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-suse-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.

Natural language support but running in an English locale

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.

> print("hello,world!")
[1] "hello,world!"
>
⬅️ Go back