Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- libname LAB2 'C:\Users\Dawid\SAS instal\med lab 2\';
- data LAB2.lab2;
- length Description $ 50;
- infile 'C:\Users\Dawid\SASPREPARING\wallmart_113.csv' dlm = ',' firstobs = 2;
- input InvoiceNo $ InvoiceDate StockCode $ Description $ InvoiceItemDateTime Quantity UnitPrice CustomeID Country $;
- run;
- proc sql;
- CREATE TABLE LAB2.sortowanie AS
- SELECT Description, COUNT(*) AS ilosc
- FROM LAB2.lab2
- GROUP BY Description
- ORDER BY ilosc DESC;
- quit;
- data Lab2.czestosc;
- set Lab2.Sortowanie;
- if ilosc > 0 then
- czestosc = ilosc/6594;
- run;
- data Lab2.liczbazbiorowczestych;
- set Lab2.czestosc;
- if czestosc <0.05 then delete;
- run;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement