Explore topic-wise InterviewSolutions in .

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

51.

To bind a row onto an already existing matrix, the ______ function can be used.(a) Rbind(b) Sbnd(c) Gbind(d) SbindThis question was addressed to me during an online interview.My question is taken from Data Types in division Nuts and Bolts and Getting Data In and Out of R Programming

Answer»

Correct ANSWER is (a) Rbind

The BEST explanation: To bind a row onto an ALREADY existing matrix, the rbind function can be used. The scan function is used to ENTER data at the terminal.

52.

Lists can be coerced with which function?(a) As.lists(b) Has.lists(c) In.lists(d) Co.listsThe question was asked in exam.The query is from Data Types topic in chapter Nuts and Bolts and Getting Data In and Out of R Programming

Answer»

The correct answer is (a) As.lists

To EXPLAIN: Lists are sometimes called generic vectors because the elements of a LIST can be of any type of R object, even lists containing further lists. This property MAKES them fundamentally different from other ATOMIC vectors. Create lists using list() and coerce other objects using as.list().

53.

Locator function gives output as ___________(a) Matrix(b) Lists(c) Vector(d) NumberI had been asked this question in an online quiz.This is a very interesting question from Data Types in portion Nuts and Bolts and Getting Data In and Out of R Programming

Answer» RIGHT choice is (B) Lists

The explanation: To extract a sublist, we use single brackets. There are a number of ways of ACCESSING the first component of a list. There are ALSO many functions within R that produce a list as output. EXAMPLES of these functions include spline(), density() and locator().
54.

Which function is used to combine the elements into a vector?(a) C()(b) D()(c) E()(d) F()I got this question during an online interview.I'm obligated to ask this question of Data Types topic in section Nuts and Bolts and Getting Data In and Out of R Programming

Answer» RIGHT answer is (a) C()

Best explanation: When you want to create a vector with more than one element, you should use c() function which means to combine the elements into a vector. We can IDENTIFY elements of a list using the [[]] convention.
55.

A __________ is an R-object which can contain many different types of elements inside it.(a) Vector(b) Lists(c) Matrix(d) FunctionsThis question was posed to me in an international level competition.I'm obligated to ask this question of Data Types in section Nuts and Bolts and Getting Data In and Out of R Programming

Answer»

Correct answer is (b) Lists

Best EXPLANATION: A LIST is an R-object which can contain MANY different types of elements in it LIKE vectors, functions and even another list inside it. We can IDENTIFY elements of a list using the [[]] convention.

56.

The ________ stores the nominal values as a vector of integers in the range of 1 to unique values in the nominal variable.(a) Factor(b) Matrix(c) Lists(d) FunctionsI got this question by my college professor while I was bunking the class.I would like to ask this question from Data Types in portion Nuts and Bolts and Getting Data In and Out of R Programming

Answer»

Right choice is (a) Factor

Easiest explanation: The factor stores the nominal values as a VECTOR of INTEGERS in the RANGE [1… k] (where k is the no. of unique values of the nominal variable), and an internal vector of character strings (the original values) MAPPED to these integers.

57.

An ordered collection of objects or components are called ________(a) Data frames(b) Datasets(c) Databases(d) ListsThe question was posed to me in exam.I need to ask this question from Data Types in section Nuts and Bolts and Getting Data In and Out of R Programming

Answer»

The correct answer is (d) Lists

The best I can explain: An ORDERED collection of OBJECTS are called lists. A list ALLOWS you to GATHER a variety of (possibly unrelated) objects under one name. We can IDENTIFY elements of a list using the [[]] convention.