Skip to main content

Data Manipulation With Dplyr — Part 2 MCQs with Explanations

Practice high-yield Programming & Software Development MCQs on Data Manipulation With Dplyr — Part 2 with worked academic solutions for FPSC, PPSC, NTS, NITB, PTS.

Questions
40
Difficulty Level
Exam-Level
Target Exams
FPSC, PPSC, NTS...
Estimated Time
48 mins
Exam-Level FPSC PPSC NTS NITB PTS
Verified for Commission Syllabus • Oct 14, 2026
40

Verified Practice Questions

Interactive test mode with detailed academic worked solutions

Live Progress | 0/40 answered
✓ 0 correct ✗ 0 wrong 0% score
Question 1 of 40
★ FPSC ★ PPSC

How do you rename a column named old_name to new_name in dplyr?

Question 2 of 40
★ FPSC ★ PPSC

In dplyr, what is the purpose of the transmute() function?

Question 3 of 40
★ FPSC ★ PPSC

How do you calculate the percentage of total sales for each category in dplyr?

Question 4 of 40
★ FPSC ★ PPSC

What is the purpose of the pivot_longer() function in dplyr?

Question 5 of 40
★ FPSC ★ PPSC

How do you filter rows where a specific variable is not equal to a given value using filter() in dplyr?

Question 6 of 40
★ FPSC ★ PPSC

Which of the following is a plot to investigate the order in which observations were recorded?

Question 7 of 40
★ FPSC ★ PPSC

Which of the following creates fluctuation plot?

Question 8 of 40
★ FPSC ★ PPSC

How many functions exist for wrangling the data with dplyr package?

Question 9 of 40
★ FPSC ★ PPSC

The profiler can be turned off by passing . . . . . . . . to Rprof().

Question 10 of 40
★ FPSC ★ PPSC

which of the following functions can be used to finely control the appearance of all lattice plots ?

Question 11 of 40
★ FPSC ★ PPSC

. . . . . . . . function is used to simulate binary random variables.

Question 12 of 40
★ FPSC ★ PPSC

. . . . . . . . display contours of a 3d surface in 2d.

Question 13 of 40
★ FPSC ★ PPSC

. . . . . . . . modify a ggplot or theme object by adding on new components.

Question 14 of 40
★ FPSC ★ PPSC

How many functions exist for tidying the data?

Question 15 of 40
★ FPSC ★ PPSC

. . . . . . . . uses regex groups instead of a splitting pattern or position.

Question 16 of 40
★ FPSC ★ PPSC

. . . . . . . . generate aesthetic mappings that describe how variables in the data.

Question 17 of 40
★ FPSC ★ PPSC

If I want to save a plot to a PDF file, which of the following is a correct way of doing that?

Question 18 of 40
★ FPSC ★ PPSC

Which of the following is an example of a vector graphics device in R?

Question 19 of 40
★ FPSC ★ PPSC

You can time . . . . . . . . expressions by wrapping them in curly braces within the call to system.time().

Question 20 of 40
★ FPSC ★ PPSC

. . . . . . . . produces box-and-whisker plots.

Question 21 of 40
★ FPSC ★ PPSC

. . . . . . . . is used for relative sizing of theme elements.

Question 22 of 40
★ FPSC ★ PPSC

How many methods exist for normalizing the data?

Question 23 of 40
★ FPSC ★ PPSC

. . . . . . . . generate random Poisson variates with a given rate.

Question 24 of 40
★ FPSC ★ PPSC

. . . . . . . . is a systematic way to examine how much time is spent in different parts of a program.

Question 25 of 40
★ FPSC ★ PPSC

. . . . . . . . is the most common probability distribution to work with.

Question 26 of 40
★ FPSC ★ PPSC

. . . . . . . . is used to determine what is plotted for each group.

Question 27 of 40
★ FPSC ★ PPSC

Which of the following is a principle of analytic graphics?

Question 28 of 40
★ FPSC ★ PPSC

Parallel processing is done via . . . . . . . . package can make the elapsed time smaller than the user time.

Question 29 of 40
★ FPSC ★ PPSC

What will be the output of the following R code? > pnorm(2)

Question 30 of 40
★ FPSC ★ PPSC

. . . . . . . . produces bivariate scatterplots or time-series plots.

Question 31 of 40
★ FPSC ★ PPSC

Which of the following draws plot on current graphics device?

Question 32 of 40
★ FPSC ★ PPSC

Which of the following is a differentiation related aesthetic?

Question 33 of 40
★ FPSC ★ PPSC

What will be the output of the following R code? > x <- rnorm(10) > summary(x)

Question 34 of 40
★ FPSC ★ PPSC

Which of the following function actually fits the linear model?

Question 35 of 40
★ FPSC ★ PPSC

. . . . . . . . generate aesthetic mappings from a string.

Question 36 of 40
★ FPSC ★ PPSC

. . . . . . . . produces one-dimensional scatterplots.

Question 37 of 40
★ FPSC ★ PPSC

. . . . . . . . create a complete ggplot appropriate to a particular data type.

Question 38 of 40
★ FPSC ★ PPSC

. . . . . . . . grammar makes a clear distinction between your data and what gets displayed on the screen or page.

Question 39 of 40
★ FPSC ★ PPSC

Annotation of plots in any plotting system involves adding points, lines, or text to the plot, in addition to customizing axis labels or adding titles. Different plotting systems have different sets of functions for annotating plots in this way. Which of the following functions can be used to annotate the panels in a multi-panel lattice plot?

Question 40 of 40
★ FPSC ★ PPSC

What will be the output of the following R code? > set.seed(10) > x <- rbinom(100, 1, 0.5) > str(x)

✓ Link copied to clipboard
Continue Your Practice

Advance Html — Part 1

Master the next curriculum module with 40 exam-standard MCQs.

Next Practice Set →

💡 Examiner's Advisory for Programming & Software Development

In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.

More Modules in Programming & Software Development

View All →
📚

Study Guides

Topic summaries and syllabus breakdown

Explore Guides →
🎯

Complete Library

Search through 78,000+ verified MCQs

Browse Library →
📱

Mobile App

Offline mock tests and instant bookmarks

Get Mobile App →