0% found this document useful (0 votes)
10 views2 pages

Module 4 - Functions

Uploaded by

NitinnitiN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Module 4 - Functions

Uploaded by

NitinnitiN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Module – 4

Problem 1: Divide 743 by 2 and obtain the result such that the output gives us a value without
the decimal point.

Problem 2: Print a 3*4 array of three dimensions, which has the input of vectors sequencing
from 13554:13590 and index the second row and third column element of third dimension of
the array.

Problem 3: What is the command to install a package in R and how do you invoke it?

Problem 4: Create an if statement that prints the name of the team that won.
 Where Team A scored 678 (out of 700), Team B scored 666 (out of 700).

Problem 5: Check whether the given number is positive and divisible by 5 or not using
conditional statements. (Hint: Use both if and else statements)
Given number: 468

Problem 6: Given is a formula of Normalization.

Create a user defined function ‘z’ such that you define the given formula within it.
Where, using max(x) and min(x) in R gives you the minimum and maximum value of x.

Problem 7: If ‘a’ is the given vector. What is the output when you apply the user defined
Normalizing function ‘z ()’ to it? [Hint: This question is the continuation of Problem 6]
a<-
c(33,434,242,434354,545,54,56,56,4534,5342,24,5,65,65,767,8,78,79,79,64,635,3,4,35,57,678,
5,86,86,457,546,34,345,34,3,4,65,6,57, ,347)

Problem 8: Achieve a Boxplot, Histogram and scatter plot on a given data ‘Q1’. Use any
column/columns to get the respective outputs.

Note: Use R to solve the given problems in the above. After you do so, cut and paste your input
and output from R to Word, else you can submit your code file along with the question and the
question number. If you are sending it in a word file add numbering in Word to identify each
part of each problem. (Do this for every problem from now on.)

You might also like