从品牌网站建设到网络营销策划,从策略到执行的一站式服务
这篇文章主要介绍了PROC SQL中逻辑判别和描述性统计函数怎么用,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。
网站建设哪家好,找创新互联!专注于网页设计、网站建设、微信开发、微信小程序、集团企业网站建设等服务项目。为回馈新老客户创新互联还提供了佳木斯免费建站欢迎大家使用!
1.逻辑表达:>,<,!=,....
*data step; data class_flags; set sashelp.class; tall = (height > 60); male = (sex = 'M'); female = (sex = 'F'); run; *proc sql; proc sql; select name, (height > 60) as tall, (sex = 'M') as male, (sex = 'F') as female from sashelp.class; quit;
2.描述性统计函数sum(),mean(),....
proc sql; select sex, max(height) as max_ht, mean(weight) as mean_wt from sashelp.class group by sex; quit; proc sql; select age, max(height*height/weight) as max_body_mass_index from sashelp.class group by age; quit;
3.联合使用
proc sql; select max(height > 60) as any_tall, mean(weight > 100) as pct_heavy, sum(gender = 'F') as num_female from sashelp.class; quit;
proc sql; select sex, max(height > 60) as any_tall, mean(weight > 100) as pct_heavy from sashelp.class group by sex; quit;
感谢你能够认真阅读完这篇文章,希望小编分享的“PROC SQL中逻辑判别和描述性统计函数怎么用”这篇文章对大家有帮助,同时也希望大家多多支持创新互联,关注创新互联行业资讯频道,更多相关知识等着你来学习!
成都网站建设公司地址:成都市青羊区太升南路288号锦天国际A座10层 建设咨询028-86922220
成都快上网科技有限公司-四川网站建设设计公司 | 蜀ICP备19037934号 Copyright 2020,ALL Rights Reserved cdkjz.cn | 成都网站建设 | © Copyright 2020版权所有.
专家团队为您提供成都网站建设,成都网站设计,成都品牌网站设计,成都营销型网站制作等服务,成都建网站就找快上网! | 成都网站建设哪家好? | 网站建设地图