70 likes | 302 Views
From SAS to R. 中国人民大学 统计学院 王 剑. 既熟悉 SAS ,又熟悉 R. 你属于哪一类 ?. 熟悉 SAS , 但不熟悉 R. 不熟悉 SAS ,但熟悉 R. 既不熟悉 SAS ,也不熟悉 R. SAS 和 R 的本质区别. SAS Reads one observation at a time. R Requires all the data to be in memory. Code. R. SAS.
E N D
From SAS to R 中国人民大学 统计学院 王 剑
既熟悉SAS,又熟悉R 你属于哪一类? 熟悉SAS, 但不熟悉R 不熟悉SAS,但熟悉 R 既不熟悉SAS,也不熟悉 R
SAS和R的本质区别 SAS Reads one observation at a time R Requires all the data to be in memory
Code R SAS Example=data.frame(Name=c("Zhao","Wang"), X1=c(22,24),X2=c(98,96)) mean(Example[,2-3]) Data Example; input Name$ X1-X2; Xm= mean(Of X1-X2); cards; Zhao 22 98 Wang 24 96 ; proc print; run; Name X1 X2 1 Zhao 22 98 2 Wang 24 96 X1 X2 23 97 Obs Name X1 X2 Xm 1 Zhao 22 98 60 2 Wang 24 96 60 Output
FREE -—— R for SAS SPSS users, Bob Muenchen
SAS的五大部分 Data input and management statements SAS Data Example; input Name$ X1-X2; Xm= mean(Of X1-X2); cards; Zhao 22 98 Wang 24 96 ; proc print; run; Statistical and graphical procedures Output Delivery System A macro language A matrix language to add new algorithms(IML)