Explore topic-wise MCQs in R Programming.

This section includes 15 Mcqs, each offering curated multiple-choice questions to sharpen your R Programming knowledge and support exam preparation. Choose a topic below to get started.

1.

A programmer builds a _________ to avoid repeating the same task or reduce complexity.

A. Function
B. Package
C. Code
D. Console
Answer» B. Package
2.

The cumulative frequency distribution of a categorical variable can be checked using the ________ function in R language.

A. Sum
B. Cumsum
C. Lumpsum
D. Resum
Answer» C. Lumpsum
3.

Which function calculates the count of each category of a categorical variable?

A. Table
B. Intact
C. Tables
D. Retabs
Answer» B. Intact
4.

Which function basically finds the intersection between two different sets of data?

A. Converge
B. Merge
C. Delegate
D. Swap
Answer» C. Delegate
5.

_________ package provides basic functionalities in R environment like arithmetic calculations, input/output.

A. R base
B. R boost
C. R serve
D. R comm
Answer» B. R boost
6.

Write a function to extract the first name in the string “Mrs. Jake Luther”?

A. Substring
B. Substr
C. Substi
D. Return
Answer» C. Substi
7.

________ function generates “n” normal random numbers based on the mean and standard deviation arguments passed to the function.

A. rnorm
B. vnorm
C. knorm
D. lnorm
Answer» B. vnorm
8.

What will be the output of runif()?

A. Random number
B. Numbers
C. Character
D. Path generation
Answer» B. Numbers
9.

Write the syntax to set the path of the current working directory in R environment?

A. Setwd(“dipath”)
B. Setwd(dir_path)
C. Setwd(“dir_path”)
D. Set(“dir_path”)
Answer» D. Set(“dir_path”)
10.

Which function is used to create a histogram for visualisation in R programming language?

A. Library
B. Hist
C. Data
D. Refer
Answer» C. Data
11.

Which function helps you perform sorting in R language?

A. Order
B. Inorder
C. Simple
D. Library
Answer» B. Inorder
12.

The current user defined objects like lists, vectors, etc. is referred to as __________ in the R language.

A. Work names
B. Work space
C. Environment
D. Console
Answer» B. Work space
13.

A ________________ in R programming language can also contain numeric and alphabets along with special characters like dot and underline.

A. Variable name
B. Number
C. Integer
D. Character
Answer» B. Number
14.

___________ function gives an error message if the desired package cannot be loaded.

A. Dplyr
B. Require
C. Library
D. Sample
Answer» D. Sample
15.

________ function is usually used inside another function and throws a warning whenever a particular package is not found.

A. Dplyr
B. Require
C. Coin
D. Sample
Answer» C. Coin