proc means data = Htwt range sum var mean nmiss median; var height; class sex; output out=height n = cnt sum = total mean = avg; run; proc print data=height; run;
结果:
[table]
|Obs sex _TYPE_ _FREQ_ cnt total avg
|1 0 237 237 14543.4 61.3646
|2 f 1 111 111 6718.4 60.5261
|3 m 1 126 126 7825.0 62.1032|
[/table]
这里的n,sum,mean选项也可以用autoname自动命名。
这里的_TYPE_,当其值为0时,表示对总体进行操作,当其值为1时,表示对各个sex子集进行操作。如果这里的class后有两个变量,例如class sex age,则_type_会有4个值:
0 整个数据集的means操作
1 对age进行子集means操作(以字母为序)
2 对sex进行子集means操作(以字母为序)
3 对sex,age进行交叉子集子集means操作,即sex*age
[b]types :对以上所述的_type_进行选择输出。[/b]
proc means data = Htwt range sum var mean nmiss median; var height; class sex age; types sex sex*age; output out=height sum = n = /autoname; run; proc print data=height; run;
proc means data = Htwt noprint chartype; var height; class sex age; types sex age sex*age; output out=height sum = n = /autoname; run; proc print data=height; run;
[table]
|结果:
|
|Obs sex age _TYPE_ _FREQ_ Sum height_N
|
|1 13.9 01 5 287.3 5
|
|2 14.0 01 7 398.6 7
|
|3 14.1 01 5 289.9 5
|
|61 f . 10 111 6718.4 111
|
|62 m . 10 126 7825.0 126
|
|63 f 13.9 11 3 171.8 3
|
|64 f 14.0 11 3 167.3 3
|
|65 f 14.1 11 3 179.1 3|
[/table]
这里age的_type_为01,sex的_type_为10,两者交叉_type_就为11。
[b]T检验:height的均值是否为70[/b]
data Htwttt; set Htwt; heighttt=height-70; run; proc means data = Htwttt n mean stderr t prt maxdec = 1 fw = 5; var height heighttt; run;
在平时工作中,难免会遇到把 XML 作为数据存储格式。面对目前种类繁多的解决方案,哪个最适合我们呢?在这篇文章中,我对这四种主流方案做一个不完全评测,仅仅针对遍历 XML 这块来测试,因为遍历 XML 是工作中使用最多的(至少我认为)。 预 备 测试环境: AMD 毒龙1.4G OC 1.5G、256M DDR333、Windows2000 Server
Netty 3.x的user guide里FrameDecoder的例子,有几个疑问:
1.文档说:FrameDecoder calls decode method with an internally maintained cumulative buffer whenever new data is received.
为什么每次有新数据到达时,都会调用decode方法?
2.Dec
hive> select * from t_test where ds=20150323 limit 2;
OK
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
问题原因: hive堆内存默认为256M
这个问题的解决方法为:
修改/us
Simply do the following:
I. Declare a global variable:
var markersArray = [];
II. Define a function:
function clearOverlays() {
for (var i = 0; i < markersArray.length; i++ )
Quick sort is probably used more widely than any other. It is popular because it is not difficult to implement, works well for a variety of different kinds of input data, and is substantially faster t