JNTU
JNTU B.Tech IV R PROGRAMMING Previous Question Paper (July/August - 2022 - R16)
Answer any five questions. All questions carry equal marks.
Main
Explain Data types in R.
Answer
R is a dynamically typed language where variables do not require explicit declaration. The primary data types are:
- Numeric: Represents real numbers, including decimals (e.g., 10.5, 5).
- Integer: Represents whole numbers. These are defined by appending an 'L' suffix (e.g., 5L).
- Character: Represents text strings enclosed in single or double quotes (e.g., "Hello").
- Logical: Represents boolean values TRUE or FALSE.
- Complex: Represents numbers with an imaginary part, denoted by 'i' (e.g., 2+3i).
- Raw: Used to hold raw bytes of data.
Write R code to tabulate a function
Answer
To tabulate the function f(x) = 3x2+2x+1 in the specified range, use the sequence generation function and vectorization:
x <- seq(-1, 1, by = 0.2)
f_x <- 3 * x^2 + 2 * x + 1
table <- data.frame(x, f_x)
print(table)The seq() function creates the vector of x-values, and the arithmetic operations are applied element-wise to the vector to compute the corresponding values of f(x). The results are then stored and displayed as a data.frame.
Discuss Essentials of the R Language in detail.
Answer
Sign in to view the complete answer paper.
Explain about sub setting R Objects.
Answer
Sign in to view the complete answer paper.
Discuss in detail about matrices in R with examples.
Answer
Sign in to view the complete answer paper.
Discuss about vectors in R with examples.
Answer
Sign in to view the complete answer paper.
Explain control structures in R with example.
Answer
Sign in to view the complete answer paper.
Explain linear algebra operations on vectors and matrices.
Answer
Sign in to view the complete answer paper.
Discuss about Text Concordance in detail.
Answer
Sign in to view the complete answer paper.
Explain about Matrix-Like Operations in detail.
Answer
Sign in to view the complete answer paper.
Write a note on Creating Lists.
Answer
Sign in to view the complete answer paper.
Discuss the following: i) Getting the Size of a List ii) Deleting List elements.
Answer
Sign in to view the complete answer paper.
Discuss various steps of Finding the Largest Cells in a Table.
Answer
Sign in to view the complete answer paper.
Write about Minima and Maxima.
Answer
Sign in to view the complete answer paper.
Discuss about Statistical Analysis with R in detail.
Answer
Sign in to view the complete answer paper.
Explain about S Generic Functions.
Answer
Sign in to view the complete answer paper.