JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
DATA SCIENCE LAB
M.Tech I Year II Semester (R19)
Course Objectives:
To make students understand learn about a Big Data – R Programming, way of solving problems.
To teach students to write programs in Scala to solve problems. Introduction to R Programming: What is R and RStudio? R is a statistical software program. It has extremely useful tools for data exploration, data analysis, and data visualization. It is flexible and also allows for advanced programming. RStudio is a user interface for R, which provides a nice environment for working with R.
1. Write an R program to evaluate the following expression ax+b/ax-b.
2. Write an R program to read input from keyboard (hint: readLine()).
3. Write an R program to find the sum of n natural numbers: 1+2+3+4+….n
4. Write an R program to read n numbers.
(i) Sum of all even numbers (ii) Total number of even numbers.
5. Write an R program to read n numbers.
(i) Total number of odd numbers (ii) Sum of all odd numbers
6. Write an R program to obtain (i)sum of two matrices A and B (ii) subtraction of two matrices A and B
(iii) Product of two matrices.
7. Write an R program for “declaring and defining functions “
8. Write an R program that uses functions to add n numbers reading from keyboard
9. Write an R program uses functions to swap two integers.
10. Write an R program that use both recursive and non-recursive functions for implementing the Factorial of a given number, n.
11. Write an R program to reverse the digits of the given number {example 1234 to be written as 4321}
12. Write an R program to implement (i)Linear search (ii) Binary Search.
13. Write an R program to implement (i)Bubble sort (ii) selection sort.
14. Write a R program to implement the data structures
(i) Vectors (ii) Array (iii) Matrix (iv) Data Frame (v) Factors
15. Write a R program to implement scan(), merge(), read.csv() and read.table() commands.
16. Write an R program to implement “Executing Scripts” written on the note pad, by calling to the R console.
17. Write a R program, Reading data from files and working with datasets
(i) Reading data from csv files, inspection of data.
(ii) Reading data from Excel files.
18. Write a R program to implement Graphs
(i) Basic high-level plots (ii)Modifications of scatter plots
(iii) Modifications of histograms, parallel box plots. Suggested Books for Lab:
1. Big data – Black Book: 2015 edition: dreamtech press. Pg. (490- 642)
2. Introducing to programming and problem solving by scala, mark c. lewis, lisa l.lacher. Page 38 of 55 R19 M.TECH. CSE/CS CRC press, second edition. Suggested Links:
1. https://www.tutorialspoint.com/scala/
2. https://www.tutorialspoint.com/r/ Page 39 of 55 R19 M.TECH. CSE/CS M. Tech - CSE/CS – II Year – I Semester Common to CSE and CS Syllabus