How create a script that given a numeric vector x


Problem

i. How write a script that prints "Hello" if the variable x is equal to 1.

ii. How write a script that will print "Even Number" if the variable x is an even number, otherwise print "Not Even":

iii. How write a script that will print 'Is a Matrix' if the variable x is a matrix, otherwise print "Not a Matrix". Hint: You may want to check out help(is.matrix)

iv. How create a script that given a numeric vector x with a length 3, will print out the elements in order from high to low. You must use if,else if, and else statements for your logic.

v. How write a script that uses if, else if, and else statements to print the max element in a numeric vector with 3 elements.

Request for Solution File

Ask an Expert for Answer!!
Other Subject: How create a script that given a numeric vector x
Reference No:- TGS03310585

Expected delivery within 24 Hours