END TERM EXAMINATION | |
First Semester[BTech] | |
Paper Code: BAI-102 | Subject : R-Language |
Time:3 Hours | Maximum Marks:60 |
Note: Q1 is compulsory. Attempt one question each from the Units I, II, III & IV | |
Q1 Discuss : (2.5*8=20) | |
(a) What is R? Mention two uses in R. | |
(b) Explain 5 mathematical functions with the help of example. | |
(c) Explain different types of vectors. | |
(d) How can datasets be combined in R? Illustrate with an example. | |
(e) What do you mean by control statements? Explain any three. | |
(f) Differentiate between Discrete data and Continuous data. | |
(g) Explain Pie Chart with suitable example. | |
(h) WAP to print Fibonacci series up to 10 elements. | |
UNIT I | |
Q2. What are R packages? How can you install and load an R package? Write a code to install and load the ggplot2 package. | |
Q3. What do you understand by objects in R? Describe the role of special values like inf, NA, NaN and NULL in R. | |
UNIT II | |
Q4. Differentiate between matrices and data frames in R. Give an example. | |
Q5. Create a data frame names students with the columns (Student_Id, Name, Score). Find the mean score of all the students. Extract the rows for students who scored more than 75. Add a new column Grade based on the Score (e.g. A for score > 80, B for 60-80, C for <60). | |
UNIT III | |
Q6. What is the difference between a T-test and ANOVA? Explain different types of T-test. | |
Q7. Explain all the terms of the code snippet:
subset(students, Score>75, select=c(Name,Score)) |
|
UNIT IV | |
Q.8 Write a program to create a Boxplot for in-built dataset mtcars. Explain boxplot. | |
Q9. What do you understand by Data Visualization? Name some of the 2-D and 3-D plots available for data visualization. |