2015年12月29日星期二

R data type

介紹 R 的data type

Vector


可儲起多個相同data type 的object.




如不同data type 的object mix在一起,R 會自動把object 的data type 轉變為同一種data type (這叫coercion)




Matrix


Matrix 可想像成由column 組成. 數字由左上往下排列,然後 往右再組成新的column。




 

cbind and rbind


 

List


類似vector 但可支援不同data type



R - Introduction and installation

R basics

R  是一種Programming language,主要用於statistics, plot graph 和date mining 等等。

Install R

從以下URL 可下載R
https://cran.rstudio.com/

下載R Studio
https://www.rstudio.com/products/rstudio/download/



Get the working directory