Question: Using R Studio, find the code for the second ToDo based upon the first ToDo: ToDo Make a vector from 1 to 100. Make a

Using R Studio, find the code for the second ToDo based upon the first ToDo:

Using R Studio, find the code for the second ToDo based upon

the first ToDo: ToDo Make a vector from 1 to 100. Make

ToDo Make a vector from 1 to 100. Make a for-loop which runs through the whole vector. Multiply the elements which are smaller than 5 and larger than 90 with 10 and the other elements with 0.1. ToDo Write a function for the previous ToDo, so that you can feed it any vector you like (as argument). Use a for-loop in the func- tion to do the computation with each ele- ment. Use the standard R function length in the specification of the counter. a

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!