Advertisement
Guest User

MED

a guest
Jan 27th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. libname LAB2 'C:\Users\Dawid\SAS instal\med lab 2\';
  2. data LAB2.lab2;
  3. length Description $ 50;
  4. infile 'C:\Users\Dawid\SASPREPARING\wallmart_113.csv' dlm = ',' firstobs = 2;
  5. input InvoiceNo $ InvoiceDate StockCode $ Description $ InvoiceItemDateTime Quantity UnitPrice CustomeID Country $;
  6. run;
  7. proc sql;
  8. CREATE TABLE LAB2.sortowanie AS
  9. SELECT Description, COUNT(*) AS ilosc
  10. FROM LAB2.lab2
  11. GROUP BY Description
  12. ORDER BY ilosc DESC;
  13. quit;
  14. data Lab2.czestosc;
  15. set Lab2.Sortowanie;
  16. if ilosc > 0 then
  17. czestosc = ilosc/6594;
  18. run;
  19. data Lab2.liczbazbiorowczestych;
  20. set Lab2.czestosc;
  21. if czestosc <0.05 then delete;
  22. run;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement