Browse papers
LevelMaster in Data Science (SMS, TU)
SubjectStatistical Computing with R
Year2078 BS
Exam sessionFirst Reassessment · Set First Re Assessment 2078, p11-12
Full marks45
Time allowed120 minutes
Questions10, all with step-by-step solutions
A

Group A

5 questions·3 marks each
1Short answer3 marks

Explain how can you import following types of text files into the R software with codes:

a) Tab separated text file b) Comma separated value text file c) Semi colon separated text file

rdata-import
2Short answer3 marks

Explain how you can do sub-setting in R software with codes:

a) Define the 5x5 matrix and select last two rows b) Select second and fourth row with third and fifth column c) Add 3 new rows in this matrix

rsubsettingmatrix
3Short answer3 marks

Explain how to do these with codes in R:

a) Define "gender" variable with male and female attributes as factor b) Check the attributes of the gender variable c) Check how the male and female values are stored in R

rfactor
4Short answer3 marks

An object called "best_practice" is stored in R. now do as follows with codes:

a) Define "Let", "the", "computer", "do", "the", "work" as elements of the "best_practice" object b) Write a function to print words (elements) of this object c) Write an improved function with loop to print the words (elements) of this object

rfunctionsloops
5Short answer3 marks

Explain different types of pipe operators with codes and examples:

a) Compound assignment operator b) Tee operator c) Exposition operator

rpipe-operators
B

Group B

5 questions·6 marks each
6Long answer6 marks

Do the followings with R script in R Studio:

a) Define a column vector X with numbers between 1 and 30 b) Define another column vector Y with cubes of X c) Combine the two column vectors in a new data frame called DF d) Get plot X and Y variables and decide which type of relationship is seen e) Get the appropriate correlation coefficient for this plot and interpret it carefully

rdata-framecorrelation
7Long answer6 marks

Create a function and do as follows:

a) Define a function: "roll" of a fair "die" twice with random sampling with replacement as true b) Get the first roll and interpret the result c) Get the second roll and interpret the result d) Get the third roll and interpret the result e) Write a summary of the results obtained in the earlier steps with conclusion

rfunctionssampling
8Long answer6 marks

Import the "covid_tbl.csv" data file in R studio as data frame and do as follows with R script:

a) Check the structure of the data frame b) View the data frame: remove the first row and last column c) Change column names by adding underscore for the spaces d) Remove "+" and "%" from the columns where they appear e) Change attributes of the number variables from characters to numbers

rdata-cleaningdata-frame
9Long answer6 marks

Use the "mtcars" dataset of R and do as follows:

a) Plot histogram of mpg variable and interpret it carefully b) Refine the histogram by filling the bars with "blue" color and changing number of bins to 10 c) Add a vertical abline at mean of the mpg variable d) Plot Q-Q plot of mpg variable, add normal Q-Q line of red color on it and interpret it carefully e) Plot density plot of mpg variable without the border, fill it with yellow color and interpret it

OR

Use the "ggplot2" package and do as follow in R studio:

a) Define first layer with diamond data, carat as x-axis and price as y-axis b) Add layer with geometric aesthetic as "point", statistics and position as "identity" c) Add layers with scale of y and x variables as continuous d) Add layer with coordinate system as Cartesian e) Add layer with appropriate title and interpret the resulting graph carefully

rvisualizationggplot2
10Long answer6 marks

Load the "igraph" package in R studio and do the basic SNA as follows with R scripts to:

a) Define g as graph object with (1,2,3,4) as its elements b) Plot the g and interpret it carefully c) Define g1 as graph object with ("Sita", "Ram", "Rita", "Gita", "Gita", "Sita", "Sita", "Gita", "Anita", "Rita", "Ram", "Sita") as its elements d) Plot g1 with node color as green, node size as 20, link color as red and link size as 10 and interpret it e) Get degree, closeness and betweenness of g1 and interpret them carefully.

OR

Load the "rdm Tweets.rdata" file in R studio and do as follows with "tm" and "tweetR" packages:

a) Convert twitter list as data frame and assign it as "df" object b) Create corpus using the "text" column of the data frame c) Perform pre-processing to clean the corpus for text mining d) Create term document matrix using the cleaned corpus e) Find the most frequent terms using the term document matrix f) Find the co-occurrence of the term "r" with filter of 0.1 and above.

rsocial-network-analysistext-mining

Frequently asked questions

Where can I find the Master in Data Science (SMS, TU) Statistical Computing with R question paper 2078?
The full Master in Data Science (SMS, TU) Statistical Computing with R 2078 (First Reassessment) question paper is available free on Kekkei. You can read every question online and attempt the paper under timed exam conditions.
Does the Statistical Computing with R 2078 paper come with solutions?
Yes. Every question on this Statistical Computing with R past paper includes a step-by-step solution, plus instant AI feedback when you attempt it on Kekkei.
How many marks is the Master in Data Science (SMS, TU) Statistical Computing with R 2078 paper?
The Master in Data Science (SMS, TU) Statistical Computing with R 2078 paper carries 45 full marks and is meant to be completed in 120 minutes, across 10 questions.
Is practising this Statistical Computing with R past paper free?
Yes — reading and attempting this Statistical Computing with R past paper on Kekkei is completely free.