R语言

R学习资源

2019-08-12  本文已影响0人  新云旧雨

在此记录一些个人觉得很有用的学习R软件的资源。(好像swirl包的篇幅比重有点高了。。。)

安装R和Rstudio

安装R:https://www.r-project.org/
安装Rstudio:https://www.rstudio.com/products/rstudio/download/
注:Rstudio是一款R的IDE,强烈推荐使用。

swirl包

swirl包是一个采用交互式方法教你使用R软件的R包。只需要在R上安装swirl包并加载swirl包

#安装swirl包
install.packages("swirl") 

#加载swirl包
library(swirl) 

加载后会显示:

| Hi! Type swirl() when you are ready to begin.

之后跟着提示就可以开始进行交互式学习了。一下是进行学习时的一些基础操作:

| You can exit swirl and return to the R prompt (>) at any time by pressing the Esc key.
| If you are already at the prompt, type bye() to exit and save your progress. When you exit properly, you'll see a short message letting you know you've done so.

| When you are at the R prompt (>):
| -- Typing skip() allows you to skip the current question.
| -- Typing play() lets you experiment with R on your own; swirl will ignore what you do...
| -- UNTIL you type nxt() which will regain swirl's attention.
| -- Typing bye() causes swirl to exit. Your progress will be saved.
| -- Typing main() returns you to swirl's main menu.
| -- Typing info() displays these options again.

目前(2019.8.10)swirl包内可以学习的课程包括:

1: R Programming: The basics of programming in R
2: Regression Models: The basics of regression modeling in R
3: Statistical Inference: The basics of statistical inference in R
4: Exploratory Data Analysis: The basics of exploring data in R

关于swirl包的更多信息,可以查看swirl官网:https://swirlstats.com/
在swirl官网上还有安装R和Rstudio的教程。

Rstudio网站上的学习资源

Rstudio网站上有很多很好的R学习资源:https://www.rstudio.com/resources
比如说Rstudio做的R速查表(cheatsheets),以及线上教程。

Datacamp

Datacamp网站上有很多以R为主要工具的统计/数据科学课程。Datacamp为R的新手提供了免费的入门课程Introduction to R,其他很多课程则需要收费。
我目前就在Datacamp网站上进行R的相关学习。

推荐教材

《R in action》,有中文翻译版《R语言实战》
《R for Data Science》 Hadley Wickham大神作品。该书有免费的线上版本:https://r4ds.had.co.nz/
《Advanced R》 Hadley Wickham大神的作品。R语言学习的进阶教材,免费线上版本地址:https://adv-r.hadley.nz/ 另外在网上也能搜到该书的中文翻译版。
《Modern R with the tidyverse》 Tidyverse已是R的新范式,通过这本书可以较为系统地了解Tidyverse 地址:https://b-rodrigues.github.io/modern_R/

R学习资源集合

一个强大的R学习资源集合网站:https://paulvanderlaken.com/2017/08/10/r-resources-cheatsheets-tutorials-books/
里面包含各种免费书籍、教程、速查表等等等等,内容很全面。

上一篇 下一篇

猜你喜欢

热点阅读