1. University Name
Practical Examination 2018
R-programming language
SET:
Degree Program: Mathematics
Course Title: R
Date of Examination:
Student’s name:
Course Code:
Semester:
Time duration: 2 hr.
Total Marks: 30
Roll No:
Note: All questions are compulsory.
Q.1) Point out the correct statement in each part : 04 marks
1. a) The value NaN represents undefined value.
b) Number Inf represents infinity in R.
c) NaN can also be thought of as a missing value.
d) All of the above.
2. a) x <- c(1 + 0i, 2 + 4i)
b) x <- c(TRUE, FALSE)
c) x <- c(T, F)
d) None of the above.
3. a) read.table(filename,header=TRUE,sep=‘,’)
b) read.csv(filename,header=TRUE,sep=‘,’)
c) read.table(filename,header=TRUE,sep=‘,’)
d) None of the above.
4. a) read.table(filename,header=TRUE)
b) read.csv(filename,header=TRUE)
c) read.table(filename,header=TRUE)
d) None of the above.
Q.2) Discuss the following by using Rstudio : 05 marks
a) Scatterplot.
b) Boxplot.
2. Luckshay Batra luckybatra17@gmail.com Page 2 of 2
Q.3) 15 marks
a) make arithmetic progressive vector.
b) Create a vector with some of your friend’s names.
c) Get the length of above vector.
d) Get the first three friends from above vector.
e) Sort your friends by names.
f) list the variables in the workspace.
g) to clear console window in R.
h) Calculate square root of 729.
i) Create a new variable ’b’ with value 1947.0.
j) Convert ‘b’ from previous exercise to character.
k) for comment in R.
l) is a tool for checking normality.
m) is used to view dataset in a spreadsheet-type format.
n) Create a vector numbers from 1 to 6 and find out its class.
o) Create a vector containing following mixed elements {1, ‘a’, 2, ‘b’} and find out its class.
Q.4) Create the following data frames in R. 06 marks
a.
b.
Student’s name: End of exam