sas - 如何转置 sas proc 报告输出
问题描述
我已经创建了一份报告(proc 报告),并且(在去谷歌大学之后)转置我的数据的所有努力都出现了严重错误。
proc report data=dataset1;
where cluster_id=1;
column ORGANISATION_CODE
ORGANISATION_NAME
ORG_TYPE
org_type_name
CLUSTER_ID
CLUSTER_NAME
CLUSTER_TYPE
CountOFD
CountOFC;
define ORGANISATION_CODE / display 'Organisation Code' CENTER
style(column)={width=1.5in} ;
define ORGANISATION_NAME / display 'Organisation Name' lEFT
style(column)={width=1.5in} ;
define org_type_name /display 'Organisation Type' CENTER
style(column)={width=1.5in} ;
define org_type_name /display 'Organisation Type Name' CENTER
style(column)={width=1.5in} ;
define CLUSTER_TYPE / display 'Cluster Type' CENTER
style(column)={width=1.5in} ;
define CLUSTER_NAME / display 'Cluster Name' CENTER
style(column)={width=1.5in} ;
define CLUSTER_ID / display 'Cluster ID' CENTER
style(column)={width=1.5in} ;
define CountOFD / display 'CountOFD' CENTER
style(column)={width=1.5in} ;
define CountOFC / display 'CountOFD' CENTER
style(column)={width=1.5in} ;
run;
ods html close;
解决方案
我同意乔的观点,我需要更多信息。
您是否尝试过define语句中的 cross选项,以及column语句中的堆叠列?请参阅http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#n1pl56sdqo09cyn1fifuhcz8dl2f.htm
如果这不起作用,请参阅 PROC TRANSPOSE。
推荐阅读
- apache-spark - 有没有办法让火花按大小而不是数据计数重新分区
- node.js - TypeScript、express、node-dev *和*自定义文件类型加载器
- arrays - 谷歌表格搜索条目并给出结果
- javascript - 在这个正则表达式中必须纠正什么才能从印度尼西亚句子中提取发音?
- sql-server - 根据第 3 列的值计算两个不同的 SUM
- gradle - Intellij 无效的 Gradle JVM 配置
- sql - SQL Join:具有累积条件的双方所有值(Presto/AWS Athena)
- amazon-web-services - Dynamodb 触发器使用 lambda 更新另一个 dynamobo 表
- node.js - TypeError:无法在反应中读取正确的长度
- javascript - 如何在 JS 中使用 map 进行过滤