Unit 12: R Tool - Subjective Questions

ECAP792 • Practice Questions with Detailed Answers

20 questions

1

Define R and explain its major features and applications in data science.

2

What is RStudio? Describe the main components of the RStudio interface.

3

Distinguish between the R Console, an R script, and the R workspace.

4

Explain how packages are installed, loaded, inspected, and updated in R. Include suitable commands.

5

Describe the important atomic data types and special values available in R. How can an object's type be examined?

6

Define an R vector. Explain different methods of creating vectors with examples.

7

Explain vector indexing and filtering in R using positive, negative, logical, and named indices.

8

Explain vectorized arithmetic, recycling, comparison, and missing-value handling in R with examples.

9

Describe the representation and manipulation of character strings in R.

10

What is a matrix in R? Explain matrix creation, naming, indexing, and dimension inspection.

11

Distinguish between element-wise and matrix operations in R. Demonstrate matrix addition, multiplication, transposition, and inversion.

12

Define an R list. Explain how lists are created, accessed, modified, and nested.

13

Compare vectors, matrices, lists, and data frames in R.

14

Explain how a data frame is created and inspected in R. Give an appropriate example.

15

Describe different methods of selecting, filtering, adding, modifying, and deleting rows or columns in an R data frame.

16

Explain type coercion in R and discuss how it affects vectors, matrices, lists, and data frames.

17

Describe the general structure of an R program, including comments, statements, assignment, expressions, and functions.

18

Explain conditional statements in R. Compare if, if...else, ifelse(), and switch() with examples.

19

Compare the loop structures for, while, and repeat in R. Explain the roles of break and next.

20

Design and explain an R function that calculates summary statistics for a numeric vector while handling missing values.