1 / 91

Name that Function: Punny Function Names With Multiple MEANings and Why You

Name that Function: Punny Function Names With Multiple MEANings and Why You Do Not Want to be MISSING Out Ben Cochran and Art Carpenter. Ben and Art have been abusing semi-colons for so many years that SAS Institute has awarded both of them with

nguyet
Télécharger la présentation

Name that Function: Punny Function Names With Multiple MEANings and Why You

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Name that Function: Punny Function Names With Multiple MEANings and Why You Do Not Want to be MISSING Out Ben Cochran and Art Carpenter Ben and Art have been abusing semi-colons for so many years that SAS Institute has awarded both of them with negative birthdays. Even bolstered with this esteemed recognition they are only just barely FUNCTIONing.

  2. Welcome to a presentation on DATA step functions We will prompt you for the name of a function Such as: We are glad that you have ________ to attend this presentation. The CHOOSEN function The CHOOSEN function returns the ith element of a list of numeric values (opposite of the WHICHN function). OK some of these are punnier than others. It may be to your credit to ‘not get the joke’ each time. 3

  3. The Functions are divided into The following categories: Travel and Leisure Walking and Hiking Personal Health and Relationships Personal Hygiene Las Vegas Food Worldly Military Miscellaneous 4

  4. Travel and Leisure Question: What function might you get at the beach? Answer: The TAN or ATAN function The TAN function measures the tangent of an angle, while ATAN returns the ArcTangent of an angle (the inverse of the tangent). 5

  5. Travel and Leisure Question: When you take a day off work, you are said to be on __________ ! Answer: a. VACATION b. PTO c. HOLIDAY d. None of the above 6

  6. Travel and Leisure Question: When you take a day off work, you are said to be on __________ ! Answer: c. HOLIDAY The HOLIDAY function returns the SAS date value of a specified holiday for a specific year. 7

  7. Travel and Leisure Question: What function might remind you of Halloweenn? Answer: a. PUMPKINN b. COSTUMEN c. MASKN d. WHICHN 8

  8. Travel and Leisure Question: What function might remind you of Halloweenn? Answer: d. WHICHN The WHICHN function searches for a numeric value that is equal to the first argument, and returns the index of the first matching value. 9

  9. Travel and Leisure Question: When on vacation, what might you want to do late into the morning? Answer: a. SNOOZE b. NoneOfYourBusiness c. SLEEP d. CHOWDOWN 10

  10. Travel and Leisure Question: When on vacation, what might you want to do late into the morning? Answer: c. SLEEP The SLEEP function suspends the execution of a program that invokes this function for a period of time. 11

  11. Travel and Leisure Question: To get to know someone special, you could go on a __________. Answer: The DATE function The DATE function returns the current date as a SAS date value and is just like the TODAY function. 12

  12. Travel and Leisure Question: On a date you might go to see this movie: “__________ Private Ryan”. Answer: The SAVINGfunction The SAVING function returns the future value of a periodic saving. 13

  13. Travel and Leisure Question: Which function will remind you to fill your car up with gas? Answer: The ARCOS function The ARCOS function returns the value of the arccosine of an angle. 14

  14. Travel and Leisure Question: What function might give you a place to rest? Answer: The COT function The COT function is in the trigonometric category and returns the cotangent. 15

  15. Travel and Leisure Question: What function is a favorite of a golden retriever? Answer: a. SNOOZE b. SQUIRREL c. STICK d. FETCH 16

  16. Travel and Leisure Question: What function is a favorite of a golden retriever? Answer: d. FETCH The FETCH function reads the next non-deleted observation from a SAS data set into the Data Set Data Vector. 17

  17. Travel and Leisure Question: What function is the least favorite of a golden retriever? Answer: The CAT function The CAT function returns a concatenated character string without removing leading or trailing blanks. 18

  18. Travel and Leisure Question: What function do you use to pack away your extra linens? Answer: a. CLOSET b. TRUNC c. All of the above d. None of the above 19

  19. Travel and Leisure Question: What function do you use to pack away your extra linens? Answer: b. TRUNC The TRUNC function truncates a numeric value to a specified number of bytes. 20

  20. Travel and Leisure Question: What function could help you pack your suitcase? Answer: a. COMPRESS b. SitOnIt c. PushItDown d. TRIM 21

  21. Travel and Leisure Question: What function could help you pack your suitcase? Answer: a. COMPRESS The COMPRESS function returns a character string with specified characters removed (by default) from the original string. 22

  22. Travel and Leisure Question: What function did the fisherman lie about? Answer: The LENGTH function The LENGTH function returns the length of the value of a character variable. 23

  23. Travel and Leisure Question: What function helps to lower the level of light? Answer: The DIM function The DIM function returns the number of elements in an array. 24

  24. Travel and Leisure Question: The movie was terrible; it was such a __________. Answer: The BOR function The BOR function returns the bitwise logical OR of two arguments. 25

  25. Travel and Leisure Question: Which function reminds us of the play “Arsenic and Old Lace”? Answer: The POISSON function The POISSON function returns the probability that an observation is from a Poisson distribution 26

  26. Walking and Hiking 27

  27. Walking and Hiking Question: When hiking in woods, you should remember this function. Answer: The PATHNAME function The PATHNAME function returns the physical name of an external file or a SAS library. 28

  28. Talking and Hiking Question: What function tends to fall behind on a walk? Answer: a. LAG b. SLOW c. SNAIL d. BarelyMoving 29

  29. Talking and Hiking Question: What function tends to fall behind on a walk? Answer: a. LAG The LAG function returns values from a queue. 30

  30. Walking and Hiking Question: What function reminds us of a fallen tree? Answer: The LOG function The LOG function returns the natural (base e) logarithm. 31

  31. Personal Health And Relationships 32

  32. Personal Health and Relationships Question: What function is a goal of a good psychologist? Answer: The NORMAL function The NORMAL function returns a random variate from a normal distribution. 33

  33. Personal Health and Relationships Question: What function does the psychologist guard against? Answer: The DEVIANCE function The DEVIANCE function returns the deviance based on a probability distribution. 34

  34. Personal Health and Relationships Question: One goal of couple’s therapy is to do this to marital issues. Answer: The RESOLVE function The RESOLVE function returns the resolved value of the argument after the argument has been processed by the macro facility. 35

  35. Personal Health and Relationships Question: The husband was ______ and it made the wife ______. Answer: The MEAN and MAD functions The MEAN function calculates the arithmetic average. The MAD function returns the median absolute deviation from the median. 36

  36. Personal Health and Relationships Question: After the divorce the ex-wife did this. Answer: a. REMARRIED b. MovedAway c. RENAMEd d. All of above 37

  37. Personal Health and Relationships Question: After the divorce the ex-wife did this. Answer: c. RENAMEd The RENAME function renames a member of a SAS library, an entry in a SAS catalog, an external file, or a directory. 38

  38. Personal Health and Relationships Question: What your mother always said: “_______ I said so”. Answer: The COS function The COS function is a trigonometric function that returns the cosine. 39

  39. Personal Health and Relationships Question: Trust but ______ . Answer: The VERIFY function The VERIFY function returns the position of the first character in a string that is not in any of several other strings. 40

  40. Personal Health and Relationships Shakespeare wrote: “Shall I ______ thee to a summer’s day?” Answer: The COMPARE function The COMPARE function returns the position of the left most character by which two strings differ. 41

  41. Personal Health and Relationships A Shakespeare misquote might read: “To be or to ______ that is the question.” Answer: The BNOT function The BNOT function returns the bitwise logical NOT of the argument (if only Shakespeare had known that!). 42

  42. Personal Hygiene and Health 43

  43. Personal Hygiene and Health Question: What function will help you ‘fix’ your hair? Answer: a. BRUSH b. COMB c. SPRAY d. PICK 44

  44. Personal Hygiene and Health Question: What function will help you ‘fix’ your hair? Answer: b. COMB The COMB function computes the number of combinations of n elements taken r at a time. 45

  45. Personal Hygiene and Health Question: Be sure to shave daily to remove the ______ . Answer: The FUZZ function The FUZZ function returns the nearest integer if the argument is within 1E-12 of that integer. 46

  46. Personal Hygiene and Health Question: You may not need a haircut, but at least get a ______. Answer: The TRIM function The TRIM function trims all trailing blanks from a character string. 47

  47. Personal Hygiene and Health Question: The person went to the hairdresser to get a ______. Answer: The PERM function The PERM function computes the number of permutations of n items that are taken r at a time. 48

  48. Personal Hygiene and Health Question: What function could be overcome by going to the gym? Answer: The WEEK function The WEEK function reads a SAS date value and returns the number of elapsed weeks within the calendar year of the SAS date value. 49

  49. Personal Hygiene and Health Question: What function is built up (improved) by going to the gym? Answer: The ABS function The ABS function returns the absolute (nonnegative) value that is equal in magnitude to the argument. 50

  50. Personal Hygiene and Health Question: After working out at the gym regularly, what do people say about you? Answer: The SUMABS function The SUMABS function returns the sum of the absolute values of the non-missing arguments. 51

More Related