如何转调 EG5.1
我有一个大约以下格式的数据集:
表格式:
ID | 2012 | 2013 | 2014 |
---|---|---|---|
A | 1 | 3 | |
B | 2 | 4 |
我想将其转置为以下格式:
表格式:
ID | Source | Value |
---|---|---|
A | 2012 | 1 |
A | 2013 | 3 |
B | 2012 | 2 |
B | 2014 | 4 |
使用转置任务。我正在 EG 5.1 中工作,但我对如何做到这一点有很大的心理障碍。大多数指南都是以相反的方式进行此操作。预先非常感谢您的任何建议。
I have a data set of approximately this format:
Table format :
ID | 2012 | 2013 | 2014 |
---|---|---|---|
A | 1 | 3 | |
B | 2 | 4 |
And I want to transpose it to this format:
Table format :
ID | Source | Value |
---|---|---|
A | 2012 | 1 |
A | 2013 | 3 |
B | 2012 | 2 |
B | 2014 | 4 |
Using the Transpose task. I'm working in EG 5.1 and I've got a massive mental block on how to do this. Most of the guides are for doing this the opposite way around. Thanks so much in advance for any advice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 proc transpose 来代替。创建一个新的 SAS 程序并运行以下代码:
输出:
在 Enterprise Guide 中,这是 Stack Columns 任务:
Use
proc transpose
instead. Create a new SAS program and run the following code:Output:
In Enterprise Guide, this is the Stack Columns task: