Jawaharlal Nehru Technological University Hyderabad

Jawaharlal Nehru Technological University Hyderabad B.Tech IV R PROGRAMMING Previous Question Paper (September 2020 - R16)

B.Tech | IV | IV-II | R16 | September 2020

Answer PaperPaper Code: 138GTMaximum Marks: 75Time: 2 Hours

Answer any Five Questions

All Questions Carry Equal Marks

Main

115 marks
a

R has five “atomic” classes of objects. What are they? Quote examples.

7 marks

Answer

The five basic or atomic classes of objects in R are character, numeric (real numbers), integer, complex, and logical (TRUE/FALSE). These represent the fundamental data types used to store values.

  • Character: Used for text data. Example: x <- "Hello"
  • Numeric: Used for decimal or real numbers. Example: x <- 10.5
  • Integer: Used for whole numbers; denoted by an 'L' suffix. Example: x <- 5L
  • Complex: Used for numbers with an imaginary component. Example: x <- 1 + 2i
  • Logical: Used for boolean values. Example: x <- TRUE
b

Make a comparison of implicit coercion and explicit coercion.

8 marks

Answer

Coercion in R refers to the process of converting an object from one data type to another. This can happen automatically (implicit) or manually (explicit).

FeatureImplicit CoercionExplicit Coercion
DefinitionAutomatic conversion by R.Manual conversion by the user.
TriggerOccurs when combining different types in a vector.Occurs using specific conversion functions.
ControlControlled by R's internal rules.Controlled by the programmer.
Examplec(1, "a") becomes a character vector.as.numeric("5") converts string to number.

Implicit coercion follows a hierarchy (e.g., logical to integer to numeric to character) to ensure data consistency within a structure. Explicit coercion is performed using functions such as as.numeric(), as.character(), as.logical(), and as.integer(), allowing the user to force a specific data type when the default behavior is not desired or when data needs to be pre-processed for specific mathematical operations.

215 marks
a

Demonstrate repeat loop and seq_along ( ) function.

7 marks

Answer

Sign in to view the complete answer paper.

b

Explain argument matching in R functions.

8 marks

Answer

Sign in to view the complete answer paper.

3

How to create a list and demonstrate all the ways of accessing a list component.

15 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

Demonstrate finding the largest cells in a table.

7 marks

Answer

Sign in to view the complete answer paper.

b

What are the arguments in a call to table( )? Give example.

8 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

What kind of tools does R has for simulation programming?

8 marks

Answer

Sign in to view the complete answer paper.

b

Discuss the significance of visualization and R’s support for it.

7 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

How are complex numbers handled in R? Explain with suitable examples.

7 marks

Answer

Sign in to view the complete answer paper.

b

How to import packages in R? Give examples.

8 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

Illustrate the concept of recycling in vectors.

7 marks

Answer

Sign in to view the complete answer paper.

b

What effect does concatenate function has on vectors? Explain with an example.

8 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Which matrix operations are applicable to data frames? Explain with examples.

8 marks

Answer

Sign in to view the complete answer paper.

b

How to run a logistic regression model on data in a data frame? Give illustration.

7 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the solved question paper with answers of R PROGRAMMING from Jawaharlal Nehru Technological University Hyderabad for B.Tech ECE IV IV-II, September 2020, R16.

For the question paper without answers, switch to the Question Paper tab.

Other papers in R PROGRAMMING

Loading Question Papers

Fetching data from database...