This set of R Programming Language Multiple Choice Questions & Answers (MCQs) focuses on “Data Wrangling – 1”.
1. _________ is new package that makes it easy to “tidy” your data.
a) tidy
b) tidyr
c) tidyneat
d) tidynr
View Answer
Explanation: Tidy data is data that’s easy to work in R.
2. Point out the correct statement?
a) Each row is an observation in tidy data
b) Each column is a variable in tidy data
c) Arranging your data in tidy way makes it easier to work
d) All of the mentioned
View Answer
Explanation: When use tidy data and tidy tools, you spend less time worrying about how to feed the output from one function into the input of another.
3. Which of the following is complementary to tidyr?
a) geolr
b) dplyr
c) d3lr
d) gekl2
View Answer
Explanation: Its easy to munge with dplyr.
4. How many functions exist for tidying the data?
a) one
b) two
c) three
d) four
View Answer
Explanation: tidyr provides three main functions for tidying your messy data: gather(), separate() and spread().
5. Point out the correct statement?
a) gather() makes “wide” data longer
b) Two functions are present for tidy data
c) separate() makes “wide” data longer
d) spread() function takes multiple columns
View Answer
Explanation: Other names for gather include melt (reshape2), pivot (spreadsheets) and fold (databases).
6. Which of the following function takes multiple columns?
a) spread()
b) gather()
c) separate()
d) extract()
View Answer
Explanation: gather() gathers column into key-value pairs.
7. __________ uses regex groups instead of a splitting pattern or position.
a) spread()
b) gather()
c) separate()
d) extract()
View Answer
Explanation: separate() allows you to tease columns apart.
8. Which of the following function works similar to separate()?
a) extract()
b) gather()
c) sep()
d) separate()
View Answer
Explanation: extract() works in a similar way.
9. Which of the following d takes two columns and spreads them into multiple columns?
a) ggmissplot
b) printplot
c) print.ggplot
d) ggplot
View Answer
Explanation: spread() makes “long” data wide.
Sanfoundry Global Education & Learning Series – R Programming Language.
Here’s the list of Best Books in R Programming Language.
- Practice Programming MCQs
- Check R Programming Books
- Apply for Programming Internship
- Check Information Technology Books