Guest User

Untitled

a guest
Feb 25th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. Dplyr Questions
  2.  
  3. 1. Which of the following return a subset of the columns of a data frame ?
  4. a) select (X)
  5. b) retrieve
  6. c) get
  7. d) all of the mentioned
  8.  
  9. 2. Point out the correct statement :
  10. a) The data frame is a key data structure in statistics and in R
  11. b) R has an internal implementation of data frames that is likely the one you will use most often
  12. c) There are packages on CRAN that implement data frames via things like relational databases that allow you to operate on very very large data frames
  13. d) All of the mentioned (X)
  14.  
  15. 3. _________ extract a subset of rows from a data frame based on logical conditions.
  16. a) rename
  17. b) filter (X)
  18. c) set
  19. d) subset
  20.  
  21. 4. _________ generate summary statistics of different variables in the data frame, possibly within strata
  22. a) rename
  23. b) summarize (X)
  24. c) set
  25. d) subset
  26.  
  27. 5. Point out the wrong statement :
  28. a) The dplyr package was developed by Hadley Wickham of RStudio
  29. b) The dplyr packageis an optimized and distilled version of his plyr package
  30. c) The dplyr package provides β€œnew” functionality to R (X)
  31. d) None of the mentioned
  32.  
  33. 6. ________ add new variables/columns or transform existing variables
  34. a) mutate (X)
  35. b) add
  36. c) apped
  37. d) arrange
  38.  
  39. 7. The _______ operator is used to connect multiple verb actions together into a pipeline
  40. a) pipe (X)
  41. b) piper
  42. c) start
  43. d) all of the mentioned
  44.  
  45. Strings and Regexps
  46.  
  47. 8. Which metacharacter matches the end of a string?
  48. A. $ (X)
  49. B. ^
  50. C. |
  51.  
  52. 9. What does this expression match?
  53. ^[abcd]
  54. A. Any string with an a, b, c, or d in it
  55. B. Any string that begins with a, b, c, or d
  56. C. Any string that begins with a lowercase a, b, c, or d (X)
  57.  
  58. 10. 8. Which of the following regular expressions will match this string:
  59. AaZzXzY
  60. A. x
  61. B. ^[a-z]*$ (X)
  62. C. ^\w*$
Add Comment
Please, Sign In to add comment