有下面2个数据集,实际observation很大,这里只列了部分。请以第一个数据集的location或第2个数据集的destination为“轴”,将a,b两数据集合并(merge), 可是这两变量名字不同(这是小事,改名即可),而且直观上没有“相等”的关系,但是仔细看一下发现,b数据变量destination的值是a数据变量location值的一部分,本题的意图是想以变量location或destination做by variable完成合并(merge), 请高手赐教,谢谢!
data a;
input location $1-22 code group $ cost;
datalines;
The city of history 2 a 30
International airport 4 b 60
University of New York 6 c 80
College of Medicine 5 d 26
;
run;
data b;
input destination :$10. time temp;
datalines;
city 2 25
university 1.5 30
airport 1 28
college 2 30
;
run;