Sie sind auf Seite 1von 2

R programming mid 1 question bank

UNIT 1
PART A:
1. List out rules for identifiers in R Language?
2. Explain basic mathematical operations on scalars?
3. Explain the two modes of Running R?
4. Explain array() function with example?
5. Explain coercion of matrix elements?
6. Explain seq() and rep() functions in creating vectors?
7. Explain sub-setting and extending of data frames?
PART B:
1. Describe the features of R programming Language?
2. Describe major components of R environment?
3. Briefly explain about R session and commands supporting to it?
4. What are the advantages and disadvantages of R?
5. What are the basic data types in R language and explain them?
6. Explain different operations on vector?
7. Explain operations on matrices?
8. Distinguish the data structures list and data frame?
9. Explain different types of classes with examples?

UNIT 2
PART A:
1. Explain the functions sup to loop-over non-vector sets?
2. Explain relational and logical operators?
3. Explain default values for arguments in a function?
4. How complex objects are returned from a function?
5. Discuss to suggest “no pointers in R”?
6. Explain recursive functions with examples?
7. Differentiate break and next statements?
8. Explain scope of variables in R functions?
9. Discuss that every function is an object in R language?
PART B:
1. Explain below statements with examples
a) If-else b)switch c) vectorized if-else
2. Explain user defined functions in R Language?
3. Explain Quick sort implementation using Recursion?
4. What is Binary Search Tree? Write its implementation in R?
5. Explain below statements with examples
a) For loop b)While loop c)Repeat loop
Programs :
1. Input a number and calculate sum of digits.
2. Write a program to print a Bill.
3. Write a program to print a series of squares and cubes from 1 to given number.
4. Write a program to print prime numbers between 1 and 100.
5. Write a program to calculate Mode of elements in a vector.
6. Write a program to Calculate Mean and Median of a vector.
7. Write a program to construct a list, named my_list contains the variables my_vector,
my_matrix, my_factor as list components?
8. Create a new list named skills which contains the elements: topics, context, properties
and list _info.
9. Create a data frame named as batsmen with their names and corresponding strike
rates. Group them into 2 categories based on the strike rate greater than equal to 100
as good and strike rate less than 100 as bad, using if-else.
10. Write an R program to print student grades using if-else-if.

UNIT 3
PART A:
1. Write about Math functions
2. Explain basics of probability, discuss about Conditional probability.
3. Explain sorting functions in R-language.
4. Write R function to find out vector cross product.
5. Discuss about Set operations in R language.
6. Explain about how connection object is used while reading a file.

PART B:

1. Discuss basics of probability. Explain with R program about probability of exactly one of
the 3 events occurring??
2. Discuss in detail about PMF, CDF and PDF functions of different statistical distributions in R
language.
3. Write about Linear Algebraic operations on vectors and matrices.
4. What is the significance of Markov chains? Explain about probability vector for successive 3
heads in coin tossing, along with program.
5. Write about the below input/output functions
i) scan() ii) cat() iii) read.table() iv) write.table()

Das könnte Ihnen auch gefallen