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:


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
Get step-by-step solutions from verified subject matter experts
