Advertisement
riabcis

Untitled

Jun 19th, 2018
2,283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SAS 0.90 KB | None | 0 0
  1. DATA grupe;
  2. INPUT vardas $ lytis $ amzius svoris 21-22;
  3. * 34567890123456789012345;
  4. CARDS;
  5. ASTA    M  20  174  70
  6. EDITA   M  18  165  55
  7. PETRAS  V  18  180  82
  8. ;
  9. DATA duomenys;
  10.  INPUT vardas $ lytis $ amzius ugis svoris;
  11. * 34567890123456789012345;
  12. CARDS;
  13. RASA    M .  174 70
  14. EDITA   M 20  .  57
  15. PETRAS  V  . 120 .
  16. ;
  17. RUN;
  18.  
  19. proc sort data=grupe; by vardas;
  20. PROC PRINT; RUN;
  21. proc sort data=duomenys; by vardas;
  22. PROC PRINT; RUN;
  23.  
  24. DATA grupe;
  25.  UPDATE grupe duomenys;
  26.  BY vardas;
  27.  DROP lytis;
  28. PROC PRINT; RUN;
  29. DATA skaite;
  30. INPUT vardas $ diena knyga $12.;
  31. * 34567890123456789012345;
  32. CARDS;
  33. EDITA     2  MATEMATIKA
  34. EDITA     3  ANGLU
  35. PETRAS    3  MATEMATIKA
  36. ONA       4  FIZIKA
  37. ;
  38. RUN;
  39. PROC PRINT; RUN;
  40. proc sort data=grupe; by vardas;
  41. proc sort data=skaite; by vardas;
  42. DATA grupe;
  43.  MERGE grupe (drop=ugis svoris) skaite (obs=3);
  44.  BY vardas;
  45.  IF (diena>2);
  46. RUN;
  47. PROC PRINT; RUN;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement