R Programming Questions and Answers – Data Wrangling – 1

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

Answer: c
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

Answer: d
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

Answer: b
Explanation: Its easy to munge with dplyr.

advertisement
advertisement

4. How many functions exist for tidying the data?
a) one
b) two
c) three
d) four
View Answer

Answer: c
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

Answer: c
Explanation: Other names for gather include melt (reshape2), pivot (spreadsheets) and fold (databases).

Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. Which of the following function takes multiple columns?
a) spread()
b) gather()
c) separate()
d) extract()
View Answer

Answer: b
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

Answer: c
Explanation: separate() allows you to tease columns apart.

advertisement

8. Which of the following function works similar to separate()?
a) extract()
b) gather()
c) sep()
d) separate()
View Answer

Answer: a
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

Answer: c
Explanation: spread() makes “long” data wide.
advertisement

Sanfoundry Global Education & Learning Series – R Programming Language.

Here’s the list of Best Books in R Programming Language.

To practice all areas of R Programming Language, Here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.