简体   繁体   中英

How to perform addition of column values in SAS for large dataset

I have a large data set having millions of records with more than 200 columns. Is there any way to perform the sum of columns in SAS.Below is the sample data.

样本数据

I want to display the data as below.Like Need to SUM all the values of columns in col1 .100+100+100+100+100+100=600

期望的输出

A simple proc summary will suffice.

proc summary data=want nway ;
  var col1-col7 ;
  output out=sum (drop=_:) sum= ;
run ;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM