sas的使用
1。建表
/*************************************/
/* create the second input data set */
/*************************************/
data patients;
input ID $ 1-4 Name $ 6-16 Sex $ 18 Age 20-21
Date 23-24 Height 26-27 Weight 29-31
ActLevel $ 33-36 Fee 38-43;
format fee 6.2;
datalines;
2458 Murray, W M 27 1 72 168 HIGH 85.20
2462 Almers, C F 34 3 66 152 HIGH 124.80
2523 Johnson, R F 43 31 63 137 MOD 149.75
2539 LaMance, K M 51 4 71 158 LOW 124.80
2544 Jones, M M 29 6 76 193 HIGH 124.80
2552 Reberson, P F 32 9 67 151 MOD 149.75
2555 King, E M 35 13 70 173 MOD 149.75
2563 Pitts, D M 34 22 73 154 LOW 124.80
2571 Nunnelly, A F 44 19 66 140 HIGH 149.75
2572 Oberon, M F 28 17 62 118 LOW 85.20
2574 Peterson, V M 30 6 69 147 MOD 149.75
2575 Quigley, M F 40 8 69 163 HIGH 124.80
2578 Cameron, L M 47 5 72 173 MOD 124.80
2586 Derber, B M 25 23 75 188 HIGH 85.20
2588 Ivan, H F 22 20 63 139 LOW 85.20
2589 Wilcox, E F 41 16 67 141 HIGH 149.75
2595 Warren, C M 54 7 71 183 MOD 149.75
;
run;

2. 使用
/*************************************/
/* specify HTML output */
/*************************************/
ods html body='table.htm' style=default;
/*************************************/
/* create a two-dimensional table */
/* with style elements specified */
/*************************************/
proc tabulate data=patients
style=[font_weight=bold]; /*字体设置*/
class actlevel; /*要分类的字段名*/
classlev actlevel / style=[just=left]; /*指定样式元素*/
var age height weight / style=[font_size=3];/**/
keyword all sum / style=[font_width=wide];
keylabel all="All Patients";
table (actlevel="Activity Level"
all*[style=[background=yellow]]),
(age height weight*f=best10.2)*mean /
style=[background=white]
misstext=[label="Missing"
style=[font_weight=light]]
box=[label="Patient Info by Activity Level"
style=[font_style=italic]];
title 'Enhanced Table';
run;
/*************************************/
/* close the HTML destination */
/*************************************/
ods html close;
/*************************************/
/* clear any titles in effect */
/*************************************/
title;

proc means data = patients n; var height; class actlevel; run;

sas的使用的更多相关文章
- 根据osdid 查询磁盘是ssd盘还是sas盘
前置条件: 1.安装LSI的Megacli软件包 Megacli64 2.安装scsi设备的查询工具lsscsi apt-get install lsscsi 步骤: 1.根据osdid 查找 盘 ...
- 选盘秘籍:用户如何选择SSD/SATA/SAS?
先学习下一些专业词汇 IDE (Integrated Drive Electronics) 电子集成驱动器 它的本意是指把"硬盘控制器"与"盘体"集成在一起的硬 ...
- sas编程-日期相差计算函数 intnx
sas编程-日期相差计算函数 intnx 示例代码: data _null_; lastdate=intnx('year',today(),-100); format lastdate ...
- SAS提供的机器学习算法
SAS graphical user interfaces help you build machine-learning models and implement an iterative mach ...
- SAS 画折线图PROC GPLOT
虽然最后做成PPT里的图表会被要求用EXCEL画,但当我们只是在分析的过程中,想看看数据的走势,直接在SAS里画会比EXCEL画便捷的多. 修改起来也会更加的简单,,不用不断的修改程序然后刷新EXCE ...
- SAS实验室之PROC TRANSPOSE
首先,抛开SAS,回忆我们在数学课本上学习的转置是什么概念,转置如下图: 以上就是数学中的转置. 那么在SAS里该如何转置呢? 先看语法格式: PROC TRANSPOSE <DATA=inpu ...
- SAS零散知识总结
1,变量名命名规范:以字母或者下划线开始,可包含字母.下划线.数字,且不超过32个字符: 2,INFILE用于读取外部数据文件,一般于FILENAME(和LIBNAME用户一致,但路径要精确到文件名( ...
- Azure China (10) 使用Azure China SAS Token
<Windows Azure Platform 系列文章目录> 本文介绍的是国内由世纪互联运维的Azure China 注意:本文介绍的是Azure China Storage Priva ...
- SAS学习笔记<一>
三个周末的SAS课程宣告结束, 总结下来 第一周的统计原理简介 第二周/第三周讲解SAS的基本操作. 总体下来,对自己的知识结构有了一个新的梳理,对比大学时期,某个老师一上来就教我们SAS编程,而未考 ...
- IDE、SATA、SCSI、SAS、FC、SSD硬盘类型介绍[zz]
目前所能见到的硬盘接口类型主要有IDE.SATA.SCSI.SAS.FC等等. IDE是俗称的并口,SATA是俗称的串口,这两种硬盘是个人电脑和低端服务器常见的硬盘.SCSI是"小型计算机系 ...
随机推荐
- 时间函数应用 time
表 1. C 时间函数 function 定义 含义 返回值 精度 time() time 函数获得从 1970 年 1 月 1 日 0 点到当前的秒数,存储在time_t结构之中. time_t 秒 ...
- hdu-3074 Multiply game---线段树+单点更新
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=3074 题目大意: 给一些数,进行点更新或者是区间计算乘积 解题思路: 裸的线段树,注意空间开大点 # ...
- 详解为什么32位系统只能用4G内存.
本文转自:https://www.cnblogs.com/nvd11/archive/2013/04/02/2996784.html,感谢作者的干货 既然是详解, 就从最基础的讲起了. 1. Bit( ...
- 页面间传递前端请求参数和获取参数:Model model,HttpServletRequest request, ModelMap map参数使用与区别
Model model, HttpServletRequest request, ModelMap map声明变量 一.下面的方法是需要将请求发过来的数据(或者说参数)传递到重定向的页面/转发的页面的 ...
- Mac安装composer爬过的坑
1.首先安装brew/usr/bin/ruby -e "$(curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/mast ...
- 解决vuex requires a Promise polyfill in this browser问题
造成这种现象的原因归根究底就是浏览器对ES6中的promise无法支持,因此需要通过引入babel-polyfill来是我们的浏览器正常使用es6的功能 首先通过npm来安装: npm install ...
- 用@ExceptionHandler 来进行异常处理
有时候我们想统一处理一个Controller中抛出的异常怎么搞呢? 直接在Controller里面加上用@ExceptionHandler标注一个处理异常的方法像下面这样子 @ExceptionHan ...
- mybatis关联集合List&分布查询传递多列值
场景:查询部门的同时,要求查询此部门下的所有用户. 部门(Department) private Integer id; private String departmentName; private ...
- C#一键显示及杀死占用端口号进程
private void t_btn_kill_Click(object sender, EventArgs e) { int port; bool b = int.TryParse(t_txt_gu ...
- MVC验证码生成类库
public class ValidateCode { /// <summary> /// 验证码的最大长度 /// </summary> public int MaxLeng ...