Question: 4.) Write 3 R programs that takes an integer input from the user between 1-7 (inclusive) and displays the corresponding name of the week. The

 4.) Write 3 R programs that takes an integer input from

4.) Write 3 R programs that takes an integer input from the user between 1-7 (inclusive) and displays the corresponding name of the week. The program should be able to filter values not in the range and values which are not exact (e.g. 3.8). The first R program should utilize if-elseested if statements. The second R program should utilize the switch() function. The third R program should utilize the case when() function. You may have to use the functions is.integer(), and message() or cat(). (1 - Sunday, 2 - Monday, 3 - Tuesday, ..., 7- Saturday) Sample Input: X

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!