-
What
-
originators
-
Ross Ihaka
- The University of Auckland, New Zealand
- R : Past and Future History
- Robert Gentleman
- contributors
-
based on
-
S language
-
John Chambers
- Bell Labs
-
commercial implementation
- S-PLUS
-
version
-
core group(1997)
-
1.0(2000-02)
- 2.0(2004-10)
- 3.0(2013-04)
- the latest release for Windows
-
a statistics program
-
a programming language
- works very well for statistics
-
Why
-
Quick-R: Why use R?
- Why R has A Steep Learning Curve
-
r4stats.com
-
Why R is Hard to Learn
- 2012-06-13
-
2014-12-09
- Unhelpful Help
- Misleading Function or Parameter Names
- Too Many Commands
- ...
-
KDnuggets
-
Annual Software Poll
- 15th
- 16th
- 17th
- TIOBE Index
-
Which
- R
- RStudio
- R commander
-
RKWard
- install KDE
-
Where
-
websites
- CRAN
- Quick-R
- r4stats
- rseek.org
-
Rbloggers
- Learn R
- StackOverflow
- Learn Data Science Online
- inside-R
- For Dummies
-
Wikipedia
-
Wikibooks
- R Programming
-
Wikiversity
- How to use R
- R Graph Gallery
- etc.
-
University web
-
Resources to help you learn and use R
- Institute for Digital Research and Education
University of California, Los Angeles
-
Applied Nonparametric Statistics
- Department of Statistics
Eberly College of Science
The Pennsylvania State University
-
Getting Started with "R"
- Boston University School of Public Health
-
Data wrangling, exploration, and analysis with R
- Department of Statistics UBC
University of British Columbia, Canada
- R Project Documentation>Books
- youtube
-
When
- anytime
-
How
-
基本操作
-
標記&符號
-
command prompt
- >
-
continuation prompt
- +
-
command seperation
- ;
-
cancel a command
- Esc
-
comment character
- #
-
assignment symbol
- <-
- =, ->
- case sensitive
- Google's R Style Guide
-
工作目錄
- getwd()
- setwd()
-
windows
- slash
- backslash
-
Help
- help.start()
-
help/?
- example()
- help.search/??
- RSiteSearch()
-
建立資料
-
basic data type
- 數值(numeric)
- integer
- double
- 複數(complex)
- 邏輯值(logical)
- TRUE/T
- FALSE/F
- 文字(character)
- built-in Constants
- ?Constants
- pi
- letters
- LETTERS
- month.abb
- month.name
- 常用函數
- paste()
- 原始資料(raw)
- charToRaw()
- rawToChar()
-
常用函數
- c()
- seq()
- rep()
-
Datasets
- data()
- iris
- head(iris)
- tail(iris)
- str(iris)
- summary(iris)
- View(iris)
- UCI Machine Learning Repository
-
資料輸入/輸出
- scan()
- cat()
- read.csv()
- write.csv()
-
基本運算
- ^,+-(unary),+-*/,%/%,%%
-
Basic Mathematical Functions
- abs(), log(), sin(), factorial(), sum(), prod(), ..., etc.
-
排序
- sort()
- rank()
- order()
-
data object type
-
vector(向量)
-
元素
- 性質相同
- 元素指標
- [ ]
-
建立方式
- c()
- seq()
- rep()
-
matrix(矩陣)
-
建立方式
- dim()
- matrix()
- cbind()、rbind()
-
矩陣運算
- +、-、*、/、%*%
-
array(陣列)
-
建立方式
- dim()
- matrix()
-
factor(因子)
-
建立方式
- factor()
- as.factor()
- ordered
-
data fraem(資料框)
- 不同類型資料
- 二維結構
-
list(串列)
-
不同
- 類別
- 長度
-
元素指標
- [[ ]]
-
time series(時間序列)
- ts()
-
判別/轉換
- is.datatype()
- as.datatype()
-
繪圖
- plot()
- par()
-
colors()
-
color names
- 657
-
how to use?
- col = "slategray3"
- col = colors() [102]
- col = rgb(.54, .0, .0)
- col = rgb(159, 182, 205, max = 255)
- col = "#FFEBCD"
- multiple/cycle colors
- col2rgb("navyblue")
-
Built-in palettes
- ?palette
- rainbow()
- heat.colors()
- red~white
- terrain.colors()
- green~grey
- topo.colors()
- purple~tan
- cm.colors()
- cyan~magenta
-
函數
- 高階
- 低階
- 互動