GUJARAT TECHNOLOGICAL UNIVERSITY
ATMIYA INSTITUTE OF TECHNOLOGY AND SCIENCE, RAJKOT
M.C.A. SEM. IV Practical
Examination
Subject:
Data Analytics with R
Date: 18/03/2017
MAX. MARKS: 30
Q.1
|
Perform following :
1)
Create a vector (4,6,3,4,6,3,…..,4,6,3) Where there are 10 occurrences of 4
Using repeat function
2) Use
the function paste to create the following character vectors of length 30: ("fn1",
"fn2", ..., "fn30").
In this case, there is no space
between fn and the number following.
3) Matrix A =
1
1 3
5 2 6
-2 -1 -3
Replace the third column of A by the sum of the second and third
columns.
4) Create a character vector like "Android", "Java", "R" , "C" , "PHP" and print length of each vector element output is like 7 4 1 1 3,.
5) create the function to do the sum of inputted number Example: no=235 then the output will be 2+3+5 = 10.
|
10
|
Q.2
|
Perform following queries using
product_master and sales_order_details table:
1) Find out the products with sell_price more than 1000 and
less than 10000 and only product_no and sell_price should be displayed.
2) Get the last 2 rows in last 2 columns from product_master
dataset.
3) List all the records whose qty_on_hand is less than 100.
And in the list all the columns should be displayed except Product_name.
4) Display all the rows of tables product_master whose names
starts with “M”.
5) Display average of qty_dispatch for each product from
sales_order.
|
10
|
Q.3
|
Read
“Rainfall.csv” and generate following charts.
1)
Generate scatter plot of rainfall for
Tokyo city with red color and double line thickness.
Provide
lines for New York ,London and Berlin city on the same plot with three
different colors.
2)
Generate a Barchart of matrix of rainfall
for all cities
Provide
colors to bars and month name as legend
|
2
2
2
4
|
***** All the Best *****
No comments:
Post a Comment