Jawaharlal Nehru Technological University Hyderabad

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

B.Tech | IV | II | R16 | July - 2021

Answer PaperPaper Code: 138GTMaximum Marks: 75Time: 3 hours

Answer any Five Questions. All Questions Carry Equal Marks.

Main

115 marks
a

R functionality is divided into number of packages. Briefly discuss them.

5 marks

Answer

R functionality is organized into a modular system of packages, which are collections of functions, data, and compiled code. These are categorized into three main groups:

  • Base Packages: These are automatically loaded when R starts and provide the fundamental functionality, including core data manipulation, arithmetic, and basic graphics.
  • Recommended Packages: These are included with the standard R distribution but must be loaded explicitly using the library() function. Examples include MASS and nlme.
  • Contributed Packages: These are developed by the community and hosted on repositories like CRAN, Bioconductor, or GitHub. They extend R's capabilities for specialized tasks such as machine learning, web scraping, and advanced data visualization.
b

What are the limitations of R?

5 marks

Answer

Despite its power, R has several notable limitations:

  • Memory Management: R is an in-memory language, meaning it loads the entire dataset into RAM. This makes it difficult to process datasets that exceed the available system memory.
  • Performance: Being an interpreted language, R is generally slower than compiled languages like C++ or Java for computationally intensive loops.
  • Security: R lacks built-in security features, making it unsuitable for embedding in web applications without additional infrastructure.
  • Inconsistent Syntax: Due to its evolution from the S language, R has some inconsistencies in function naming and argument ordering, which can be confusing for beginners.
c

Illustrate explicit coercion of R objects.

5 marks

Answer

Sign in to view the complete answer paper.

215 marks
a

How are complex numbers handled in R?

7 marks

Answer

Sign in to view the complete answer paper.

b

Discuss the principal functions reading data into R and functions for writing data to files.

8 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Explain the scoping rules of variables.

5 marks

Answer

Sign in to view the complete answer paper.

b

Compare and contrast matrices with vectors.

5 marks

Answer

Sign in to view the complete answer paper.

c

Illustrate common vectorized operations.

5 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

How to find runs of consecutive 1’s in binary data vector? Write code to find runs of length 2 in (1, 0, 0, 1, 1, 1, 0, 1, 1) and discuss the output.

8 marks

Answer

Sign in to view the complete answer paper.

b

Illustrate selection function which on vectors.

7 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Discuss the applications of recursive lists.

7 marks

Answer

Sign in to view the complete answer paper.

b

How to merge data frames? Explain with an example.

8 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

Demonstrate the usage of aggregate and cut functions on tables and factors.

7 marks

Answer

Sign in to view the complete answer paper.

b

Suppose we have n independent events, and the ith event has the probability pi of occurring. Write R code to find the probability of exactly one of these events occurring. [Read the input from the user into vector]

8 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

“R is very much object oriented program in outlook.” Support or oppose this statement with proper justification.

8 marks

Answer

Sign in to view the complete answer paper.

b

Implement a generic function on S3 class.

7 marks

Answer

Sign in to view the complete answer paper.

8

Write suitable R code to perform statistical analysis on the following odor data in a chemical process:

OdorTemperatureRatioHeight
66-1-10
58-10-1
650-1-1
-31000
391-10
1710-1
701-1
-35000
43-110
-5-101
430-11
-26000
49110
-40101
-22011
15 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of R PROGRAMMING from Jawaharlal Nehru Technological University Hyderabad for B.Tech EEE IV II, July - 2021, R16.

For the solved question paper with answers, switch to the Answer Paper tab.

Loading Question Papers

Fetching data from database...