Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dplyr Questions
- 1. Which of the following return a subset of the columns of a data frame ?
- a) select (X)
- b) retrieve
- c) get
- d) all of the mentioned
- 2. Point out the correct statement :
- a) The data frame is a key data structure in statistics and in R
- b) R has an internal implementation of data frames that is likely the one you will use most often
- 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
- d) All of the mentioned (X)
- 3. _________ extract a subset of rows from a data frame based on logical conditions.
- a) rename
- b) filter (X)
- c) set
- d) subset
- 4. _________ generate summary statistics of different variables in the data frame, possibly within strata
- a) rename
- b) summarize (X)
- c) set
- d) subset
- 5. Point out the wrong statement :
- a) The dplyr package was developed by Hadley Wickham of RStudio
- b) The dplyr packageis an optimized and distilled version of his plyr package
- c) The dplyr package provides βnewβ functionality to R (X)
- d) None of the mentioned
- 6. ________ add new variables/columns or transform existing variables
- a) mutate (X)
- b) add
- c) apped
- d) arrange
- 7. The _______ operator is used to connect multiple verb actions together into a pipeline
- a) pipe (X)
- b) piper
- c) start
- d) all of the mentioned
- Strings and Regexps
- 8. Which metacharacter matches the end of a string?
- A. $ (X)
- B. ^
- C. |
- 9. What does this expression match?
- ^[abcd]
- A. Any string with an a, b, c, or d in it
- B. Any string that begins with a, b, c, or d
- C. Any string that begins with a lowercase a, b, c, or d (X)
- 10. 8. Which of the following regular expressions will match this string:
- AaZzXzY
- A. x
- B. ^[a-z]*$ (X)
- C. ^\w*$
Add Comment
Please, Sign In to add comment