Jawaharlal Nehru Technological University Hyderabad

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

B.Tech | IV | II | R16 | June - 2024

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

Note: i) Question paper consists of Part A, Part B. ii) Part A is compulsory, which carries 25 marks. In Part A, Answer all questions. iii) In Part B, Answer any one question from each unit. Each question carries 10 marks and may have a, b as sub questions.

Part A

1a

How can we assign a value to a variable? Give example.

2 marks

Answer

In R, values are assigned to variables using the assignment operators <-, =, or ->. The <- operator is the most commonly used and idiomatic way to assign values in R.

x <- 10

In this example, the numeric value 10 is assigned to the variable named x.

1b

Distinguish between interactive and batch mode of executing R program.

3 marks

Answer

The distinction between interactive and batch modes in R programming lies in how the user interacts with the interpreter and how the execution process is managed:

  • Interactive Mode: In this mode, the user enters commands directly into the R console or an IDE like RStudio. The interpreter executes each command immediately after it is entered and displays the result. This is ideal for exploratory data analysis, debugging, and testing code snippets in real-time.
  • Batch Mode: In this mode, the R script is saved as a file (typically with a .R extension) and executed as a single unit by the operating system or a scheduler. The user does not interact with the code during execution, and the output is usually redirected to a log file or console output stream. This is preferred for running long-running processes, automated reporting, or production scripts where human intervention is not required.
1c

Write a program in R to display the current date and day.

2 marks

Answer

Sign in to view the complete answer paper.

1d

Explain the role of indexing in R programming.

3 marks

Answer

Sign in to view the complete answer paper.

1e

How can we create a list? Give an example.

2 marks

Answer

Sign in to view the complete answer paper.

1f

Explain the role of NA with respect to data frames in R.

3 marks

Answer

Sign in to view the complete answer paper.

1g

Why we are using the tabdom function.

2 marks

Answer

Sign in to view the complete answer paper.

1h

Give a brief description of the marginal values of a variable.

3 marks

Answer

Sign in to view the complete answer paper.

1i

What is a class? In what way it differs from the method?

2 marks

Answer

Sign in to view the complete answer paper.

1j

Distinguish between ls() and rm().

3 marks

Answer

Sign in to view the complete answer paper.

Part B

210 marks
a

Define a variable. List and explain the rules to be followed to define it.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write and explain the basic classification of objects in R.

5 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a

Write and explain the different types of coercion in R.

5 marks

Answer

Sign in to view the complete answer paper.

b

How can we represent the categorial data? Explain with an example.

5 marks

Answer

Sign in to view the complete answer paper.

410 marks
a

With the help of a syntax and example program, explain how to test a condition and act on it.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write an R program to find the sum of odd and even numbers present between 1 to 20.

5 marks

Answer

Sign in to view the complete answer paper.

OR
510 marks
a

Which statement is used to execute a loop a fixed number of times? Explain it with a program.

5 marks

Answer

Sign in to view the complete answer paper.

b

How can we represent matrices using R? Demonstrate with an example program.

5 marks

Answer

Sign in to view the complete answer paper.

610 marks
a

With the help of an example program, explain how we can add and delete elements into a list.

5 marks

Answer

Sign in to view the complete answer paper.

b

How many types of apply functions are there? Explain them with respect to data frames.

5 marks

Answer

Sign in to view the complete answer paper.

OR
7

What is a data frame? How can we create it? List and explain the various matrix-like operations that can be performed on it. Explain them with an example program.

10 marks

Answer

Sign in to view the complete answer paper.

810 marks
a

Write a program in R to find the smallest and largest element present in the table.

5 marks

Answer

Sign in to view the complete answer paper.

b

List and explain the matrix / array like operations on tables.

5 marks

Answer

Sign in to view the complete answer paper.

OR
910 marks
a

Explain the working of aggregate and cut functions with respect to tables.

5 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. What is the probability of exactly one of these events occurring?

5 marks

Answer

Sign in to view the complete answer paper.

1010 marks
a

How can we present the data in the form of a histogram? Demonstrate with example.

5 marks

Answer

Sign in to view the complete answer paper.

b

What is a generic function? List their advantages and disadvantages over normal functions.

5 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a

Define inheritance. In what way is it useful in programming languages? Explain.

5 marks

Answer

Sign in to view the complete answer paper.

b

What is meant by code profiling? Illustrate with an example.

5 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 ECE IV II, June - 2024, R16.

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

Other papers in R PROGRAMMING

Loading Question Papers

Fetching data from database...