由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - 求问一道SAS adv 题
相关主题
A SAS problemSAS中FORMAT问题求教
in =option的一道题[合集] 初级傻问题,莫笑
SAS 问题:关于比较variable 包子答谢[合集] 请教一个sas问题
SAS base question一个sas macro variable的问题。
SAS sampling的问题How to add a variable showing observations from 1 to 1000
求教 SAS base 123 Q 16sas新手求救,合并databases
新人报道,兼问SAS data set的问题[合集] 问个SAS的问题
SAS help请问如何把SAS dataset转到R里?
相关话题的讨论汇总
话题: variable话题: two话题: num话题: data话题: type
进入Statistics版参与讨论
1 (共1页)
s*********h
发帖数: 16
1
想不明白为什么下面两个datasets merge会出错。请指教
The variable attributes of SAS data sets ONE and TWO are shown below:
ONE
# Variable Type Len Pos
2 sales Num 8 8
1 year Num 8 0
TWO
# Variable Type Len Pos
2 budget Num 8 8
3 sales Char 8 16
1 year Num 8 0
Data set ONE contains 100 observations. Data set TWO contains 50
observations. Both data sets are sorted by the
variable YEAR. The following SAS program is submitted:
data three;
merge one two;
by year;
run;
Which one of the following is the result of the prog
c**********e
发帖数: 2007
2
B.
I got the real problem when I tried to merge two datasets
by patient id, but in one dataset it was numeric, but in
another dataset it was char. The two variables look identical.
I had to change type of one of them before merging.
This problem is different in that the type mismatch is not for
the by variable. But the error message is the same.
c**********e
发帖数: 2007
3
To make it work, you either change type or rename the
sales variable in one of the datasets.

【在 s*********h 的大作中提到】
: 想不明白为什么下面两个datasets merge会出错。请指教
: The variable attributes of SAS data sets ONE and TWO are shown below:
: ONE
: # Variable Type Len Pos
: 2 sales Num 8 8
: 1 year Num 8 0
: TWO
: # Variable Type Len Pos
: 2 budget Num 8 8
: 3 sales Char 8 16

s*********h
发帖数: 16
4
Thank you all so much!
1 (共1页)
进入Statistics版参与讨论
相关主题
请问如何把SAS dataset转到R里?SAS sampling的问题
SAS data merge求助求教 SAS base 123 Q 16
a question about SAS新人报道,兼问SAS data set的问题
SAS format 的问题SAS help
A SAS problemSAS中FORMAT问题求教
in =option的一道题[合集] 初级傻问题,莫笑
SAS 问题:关于比较variable 包子答谢[合集] 请教一个sas问题
SAS base question一个sas macro variable的问题。
相关话题的讨论汇总
话题: variable话题: two话题: num话题: data话题: type