Download presentation

Presentation is loading. Please wait.

Published byKaren Topping Modified about 1 year ago

1
中国人民大学 统计学院 王 剑 From SAS to R

2
你属于哪一类 ? 既熟悉 SAS ，又熟悉 R 熟悉 SAS ， 但不熟悉 R 不熟悉 SAS ，但熟悉 R 既不熟悉 SAS ，也不熟悉 R

3
SAS 和 R 的本质区别 R Requires all the data to be in memory SAS Reads one observation at a time

4
Code Data Example; input Name$ X1-X2; Xm= mean(Of X1-X2); cards; Zhao Wang ; proc print; run; SASR Example=data.frame( Name=c("Zhao","Wan g"), X1=c(22,24),X2=c(98, 96)) mean(Example[,2-3]) Name X1 X2 1 Zhao Wang X1 X Obs Name X1 X2 Xm 1 Zhao Wang Output

5
FREE SASR Data Structure Rectangular data set Rectangular data frame, vector, matrix, list. Choosing data All the data for an analysis must be in a single data set Analyses can freely combine variables from different data frames or other structures. Choosing Observations Uses logical conditions in IF, SELECT IF, WHERE Uses wide variety of selection by index value, variable name, logical condition -—— R for SAS SPSS users, Bob Muenchen

6
SAS 的五大部分 Statistical and graphical procedures Data input and management statements Output Delivery System A macro language A matrix language to add new algorithms(IML) Data Example; input Name$ X1-X2; Xm= mean(Of X1-X2); cards; Zhao Wang ; proc print; run; SAS

7

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google